ReSharper的10测试运行没有找到外部文件引用的AppSettings [英] ReSharper 10 test runner failing to find AppSettings referenced from external file

查看:347
本文介绍了ReSharper的10测试运行没有找到外部文件引用的AppSettings的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我最近升级到10.0.1 ReSharper的为Visual Studio 2013年我单位的测试项目中包含它包含了一个app.config文件:

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" />

引用的配置文件设置为复制总是到输出目录。我验证测试是从\bin\debug关闭该项目文件夹中运行,并且这两个引用的配置文件被正确地复制到该文件夹​​。但是,在运行测试时,我观察到:

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 不包含任何的按键从AppSettings.local.config。

  2. ConfigurationManager.AppSettings 不包含 otherSetting

  3. ConfigurationManager.ConnectionStrings 确实包含全部来自ConnectionStrings.local.config的关键。

  4. 使用 configSource 属性代替文件 <的appSettings> 也不行

  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.

我管理配置文件的方式并没有在改变。很长时间,一直正常工作。这个问题似乎肯定与升级到ReSharper的10. ReSharper的的单元测试设置,我已禁用影复制组件和使用单独的AppDomain和从运行测试设置为项目输出文件夹重合。我已经重新启动VS更改这些设置后多次。

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.

这听起来像一个可能的ReSharper的错误或可我失去了一些东西明显?

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

更新:

UPDATE:

我已经降级为9.2 ReSharper的和我的困境已经消失了。所以,我只能说这是一个ReSharper的10问题。但我不能确定它是否是一个真正的bug(肯定似乎这样),或者如果我错过了一个新设置的地方,所以任何见解仍然可以理解的。

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.

推荐答案

这是一个已知问题 10.0.0和R#10.0.1版本。在 R·10.0.2 EAP固定建立

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

这篇关于ReSharper的10测试运行没有找到外部文件引用的AppSettings的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆