Hi, I have a tests, in which Setup I write some entries in the config file, and on tear-down I remove them.
I use:
var config = ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None);
All this works well under NUnit or Reshrper, but fails in NCrunch. I.e. looks like the writing in the config file works, but later on during the test, the runner does not find the right config file, because the tests fail with config entry not found.
Stepping trough the Setup method, I see that the above line of code uses FilePath "C:\\Users\\sunny\\AppData\\Local\\NCrunch\\2424\\19\\MobileServices.Tests\\bin\\Debug\\MobileServices.Tests.dll.config.ncrunchconfig
As the entries I create are for WCF endpoints (I need to test that my startup class succeeds to bind the proxies), looks like when the WCF infrastructure kicks in to get the config file, it gets something else.
Running the same thing under resharper shows that it gets/writes in MobileServices.Tests.dll.config, and it works.
Any idea how to approach this problem?