我正在嘗試使用Visual Studio 2015和本地TFS 2013服務器爲傳統VB.Net ASP.Net Forms應用程序設置持續集成過程。不過,我努力獲得構建定義來成功構建我的應用程序。MSBuild由於缺少文件而失敗 - 我實際上想要排除
構建失敗,並顯示以下錯誤。
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\WebApplications\Microsoft.WebApplication.targets (182): Could not copy the file "appSettings.config" because it was not found.
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\WebApplications\Microsoft.WebApplication.targets (182): Could not copy the file "connectionStrings.config" because it was not found.
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\WebApplications\Microsoft.WebApplication.targets (182): Could not copy the file "globalization.config" because it was not found.
三個文件提到appSettings.config
,connectionStrings.config
和globalization.config
都configSource
配置文件(外部配置文件web.config中引用),我不希望我的CI的MSBuild的一部分使用(我希望在CI系統web.config上使用變換來交換必要的設置)。
它們的屬性標記爲Build Action: Content
和Copy to output directory: Do not copy
。這些文件屬性是否正確告訴MSBuild忽略它們?我試圖切換到Build Action: None
沒有成功。
是否需要將額外的配置添加到我的項目文件或MSBuild設置才能讓它忽略它們?
您是否將該網站「發佈」爲您的asp.net應用程序構建的一部分? – granadaCoder
我想在將其發佈到Azure Web應用程序之後發佈它,但由於此錯誤阻止了構建本身,所以我還沒有配置它。 – Ted
如果它通過TFS構建而不是通過本地msbuild工作,您是否嘗試過? –