We use TraceSource logging in our application. Sometimes it would be useful to enable logging whilst the tests are running. Usually this involves adding some config to the application exe.config. If I want to add this to the NCrunch config files so that output is picked up by the tests which config files should I add it to, or is there a better way to add this config?
Daily Usage Issues
Adding tracesource configuration to ncrunch processes
Started by samholder on 4,903 views
Remco NCrunch Developer
#10388
16 May 2017 22:09 UTC
Hi, thanks for posting.
Usually, it should be possible to add this to the config file for the test project (i.e. myproject.config). NCrunch specifically detects test project config files and will include them in the runtime environment by using them as the source of configuration for the test application domain.
There are some configuration settings (such as binding redirections) that can only be applied to the config file of the task host process itself (i.e. C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\Extensions\Remco Software\NCrunch for Visual Studio 2017\nCrunch.TaskRunner462.x86.TestHost.exe.config). I don't believe TraceSource is one of these.
Usually, it should be possible to add this to the config file for the test project (i.e. myproject.config). NCrunch specifically detects test project config files and will include them in the runtime environment by using them as the source of configuration for the test application domain.
There are some configuration settings (such as binding redirections) that can only be applied to the config file of the task host process itself (i.e. C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\Extensions\Remco Software\NCrunch for Visual Studio 2017\nCrunch.TaskRunner462.x86.TestHost.exe.config). I don't believe TraceSource is one of these.
Post a reply
Log in to reply.