gpt4 book ai didi

visual-studio-2010 - 测试时输出目录的配置文件

转载 作者:行者123 更新时间:2023-11-28 20:58:03 25 4
gpt4 key购买 nike

当我从 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/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com