我有一個包含asp.net C#項目,4.0框架的VS 2010解決方案。我們使用Teamcity 7.1.1(構建24074)作爲CI和部署服務器。Teamcity:VS 2010解決方案轉換爲VS 2012後無法部署解決方案
我們升級到Visual Studio 2012並轉換此解決方案,並且在生成服務器上安裝了Microsoft Visual Studio 2012 Shell (Integrated) Redistributable Package,以便生成包括[...] \ MSBuild \ Microsoft \ VisualStudio \ v11.0 \ web應用\ Microsoft.WebApplication.targets。
轉換到2012年後,我注意到部署不再工作,工件沒有創建(但Teamcity也不抱怨!)。我只得到這對構建日誌:
[...]
[17:11:58][Providers\Providers.csproj.teamcity] GetCopyToOutputDirectoryItems
[17:11:58][Providers\Providers.csproj.teamcity] _CopyOutOfDateSourceItemsToOutputDirectoryAlways
[17:11:58][_CopyOutOfDateSourceItemsToOutputDirectoryAlways] Copy
[17:11:58][Copy] Copying file from "C:\TeamCity\buildAgent\work\c52628138e1ee4d4\Providers\NLog.config" to "bin\NLog.config".
[17:11:58][Providers\Providers.csproj.teamcity] CopyFilesToOutputDirectory
[17:11:58][CopyFilesToOutputDirectory] Copy
[17:11:58][Copy] Copying file from "obj\Release\Providers.dll" to "bin\Providers.dll".
[17:11:58][CopyFilesToOutputDirectory] Providers.csproj -> C:\TeamCity\buildAgent\work\c52628138e1ee4d4\Providers\bin\Providers.dll
[17:11:58][CopyFilesToOutputDirectory] Copy
[17:11:58][Copy] Copying file from "obj\Release\Providers.pdb" to "bin\Providers.pdb".
==> [17:11:58]Process exited with code 0
[17:11:58]Publishing internal artifacts
[17:11:58][Publishing internal artifacts] Sending build.finish.properties.gz file
[17:11:58]Publishing artifacts
[17:11:58][Publishing artifacts] Collecting files to publish: [Providers\obj\Release\Package]
==> [17:11:58][Publishing artifacts] Artifacts path Providers/obj/Release/Package not found
[17:11:58]Build finished
到解決方案所做的唯一變化是在的.sln和.csproj的文件(由Visual Studio)。如果我恢復到以前的版本,團隊城市的構建和部署沒有問題。 對項目文件的更改與explained in this post相同,我嘗試了建議的解決方案(將VisualStudioVersion = 11.0傳遞給MSBuild),但它不起作用。
如果我使用解決方案資源管理器中的發佈鏈接從Visual Studio進行部署,它也可以按預期方式工作。我將在VS 2012中創建一個基礎項目的新解決方案,並測試它是否從Teamcity部署。
還有其他想法嗎?
---更新---
但願,這不是解決辦法:我做了相反的建議on the above post,我設置的MSBuild參數VisualStudioVersion = 10.0和它的作品! 因此,爲了部署一個VS 2012項目,我不得不將它視爲VS 2010項目......你在做什麼不同?我應該做什麼才能在沒有作弊團隊的情況下進行部署?
---更新---
我加入我的TeamCity配置的一些快照。 Teamcity passes the system and environment variables as build parameters to MSBuild。
在VS 2012中測試了新的解決方案(2010年沒有轉換)=>相同的結果,沒有創建工件。沒有來自Teamcity的錯誤。 – qbantek
在論壇上爲每個建議在構建服務器上安裝了Microsoft Visual Studio 2012的團隊資源管理器:無效。我沒有做的唯一的事情就是在構建服務器(!)上安裝VS 2012,應該嗎? – qbantek
你將什麼命令行發送到msbuild? –