2011-02-18 60 views
1

當我從Visual Studio 2010執行測試時,測試中使用的app.config未被複制到文件夾TestResults/Out。 Icant設置部署測試設置,因爲有多個測試項目具有相同的文件名配置文件在測試時輸出目錄

我該怎麼做才能解決這個問題?運行測試時是否有其他方式來實現內容文件部署?

在此先感謝

回答

0

這是相對簡單的使用您的測試中的自定義配置文件。 例如:

/// <summary> 
/// Summary description for RelatorioTest 
/// </summary> 
[TestClass] 
[DeploymentItem("dependency.config")] <- put here your configuration file path. 
public class RelatorioTest 
{ 
    ... 
}