4
votes

I recently upgraded to ReSharper 10.0.1 for Visual Studio 2013. My unit test project contains an app.config file which contains this:

<appSettings file="AppSettings.local.config">
    <add key="otherSetting" value="foo" />
</appSettings>
<connectionStrings configSource="ConnectionStrings.local.config" />

The referenced config files are set to "Copy always" to the output directory. I verified that tests are running from \bin\debug off the project folder, and that both referenced config files are copied correctly to that folder. However, when running the tests, I've observed that:

  1. ConfigurationManager.AppSettings DOES NOT contain any of the keys from AppSettings.local.config.
  2. ConfigurationManager.AppSettings DOES contain otherSetting.
  3. ConfigurationManager.ConnectionStrings DOES contain all of the keys from ConnectionStrings.local.config.
  4. Using the configSource attribute instead of file in <appSettings> does not work either.

The way I manage config files has not changed in a very long time and has always worked fine. The problem definitely seemed to coincide with the upgrade to ReSharper 10. In ReSharper's unit testing settings, I've disabled "shadow-copy assemblies" and "use seperate AppDomain", and "Run test from" is set to project output folder. I've restarted VS many times after changing these settings.

Does this sound like a possible ReSharper bug or could I be missing something obvious?


UPDATE:

I've downgraded to ReSharper 9.2 and my woes have disappeared. So I can only conclude that this is a ReSharper 10 issue. But I'm not certain whether it's a bona fide bug (sure seems that way), or if I missed a new setting somewhere, so any insights would still be appreciated.

1
I can also confirm that this is happening with VS2015 and resharper 10.01user663470

1 Answers

2
votes

It is a known issue for R# 10.0.0 and R# 10.0.1 releases. Fixed in R# 10.0.2 EAP builds