当我从 Visual Studio 2010 执行测试时,测试中使用的 app.config 没有被复制到文件夹 TestResults/Out。 我无法设置 Deployment 测试设置,因为有多个测试项目具有相同的文件名
我该怎么做才能解决这个问题?运行测试时还有其他方法可以实现内容文件部署吗?
提前致谢
最佳答案
在测试中使用自定义配置文件相对简单。 例如:
/// <summary>
/// Summary description for RelatorioTest
/// </summary>
[TestClass]
[DeploymentItem("dependency.config")] <- put here your configuration file path.
public class RelatorioTest
{
...
}
关于visual-studio-2010 - 测试时输出目录的配置文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5044262/