2010-11-24 87 views
0

我被授予研究和實現我們的小型.Net商店CI的任務。在完成我們的研究之後,我們選擇了TeamCity進行自動構建。安裝TeamCity和MSBuild非常簡單,但問題在於我開始構建時。我總是會得到一個錯誤。從外觀上看,它試圖調用共享庫項目,所以我做的第一件事就是編輯VCS以包含共享庫,但那不能解決問題。使用TeamCity運行構建時獲取MSBuild錯誤MSB3202

請檢查構建日誌,並告訴我是否需要通過TeamCity或VS 2008配置MSBuild?

[09:32:29]: Checking for changes 
[09:32:31]: Clearing temporary directory: C:\Program Files\TeamCity\BuildAgent\temp\buildTmp 
[09:32:31]: Checkout directory: C:\Program Files\TeamCity\BuildAgent\work\18eca7a0915880c3 
[09:32:31]: Updating sources: server side checkout... (3s) 
[09:32:31]: [Updating sources: server side checkout...] Building incremental patch for VCS root: Shared Libraries 
[09:32:33]: [Updating sources: server side checkout...] Building incremental patch for VCS root: My TFS Two 
[09:32:35]: [Updating sources: server side checkout...] Repository sources transferred 
[09:32:35]: Project "Apollo.sln.teamcity.patch.tcprojx" (TeamCity_Generated_Build 
target(s)): 
[09:32:36]: [Project "Apollo.sln.teamcity.patch.tcprojx" (TeamCity_Generated_Build target(s)):] ..\..\..\Shared Libraries\Local.Data\v2\Local.Data.csproj warning MSB4122: Scanning project dependencies for project "..\..\..\Shared Libraries\Local.Data\v2\Local.Data.csproj" failed. The project file "C:\Program Files\TeamCity\BuildAgent\work\18eca7a0915880c3\..\..\..\Shared Libraries\Local.Data\v2\Local.Data.csproj" was not found. 
[09:32:36]: [Project "Apollo.sln.teamcity.patch.tcprojx" (TeamCity_Generated_Build target(s)):] ..\..\..\Shared Libraries\Local.Web\v2\Local.Web.csproj warning MSB4122: Scanning project dependencies for project "..\..\..\Shared Libraries\Local.Web\v2\Local.Web.csproj" failed. The project file "C:\Program Files\TeamCity\BuildAgent\work\18eca7a0915880c3\..\..\..\Shared Libraries\Local.Web\v2\Local.Web.csproj" was not found. 
[09:32:36]: [Project "Apollo.sln.teamcity.patch.tcprojx" (TeamCity_Generated_Build target(s)):] ..\..\..\Shared Libraries\Twitterizer\root\Twitterizer.OAuth\Twitterizer.OAuth.csproj warning MSB4122: Scanning project dependencies for project "..\..\..\Shared Libraries\Twitterizer\root\Twitterizer.OAuth\Twitterizer.OAuth.csproj" failed. The project file "C:\Program Files\TeamCity\BuildAgent\work\18eca7a0915880c3\..\..\..\Shared Libraries\Twitterizer\root\Twitterizer.OAuth\Twitterizer.OAuth.csproj" was not found. 
[09:32:36]: [Project "Apollo.sln.teamcity.patch.tcprojx" (TeamCity_Generated_Build target(s)):] ..\..\..\Shared Libraries\log4net\root\log4net.csproj warning MSB4122: Scanning project dependencies for project "..\..\..\Shared Libraries\log4net\root\log4net.csproj" failed. The project file "C:\Program Files\TeamCity\BuildAgent\work\18eca7a0915880c3\..\..\..\Shared Libraries\log4net\root\log4net.csproj" was not found. 
[09:32:36]: [Project "Apollo.sln.teamcity.patch.tcprojx" (TeamCity_Generated_Build 
target(s)):] Project "Apollo.sln" (Rebuild target(s)): 
[09:32:36]: [Project "Apollo.sln" (Rebuild target(s)):] Building solution configuration "Deployment|Any CPU". 
[09:32:36]: [Project "Apollo.sln" (Rebuild target(s)):] C:\Program Files\TeamCity\BuildAgent\work\18eca7a0915880c3\Apollo.sln error MSB3202: The project file "..\..\..\Shared Libraries\Local.Data\v2\Local.Data.csproj" was not found. 
[09:32:36]: [Project "Apollo.sln" (Rebuild target(s)):] C:\Program Files\TeamCity\BuildAgent\work\18eca7a0915880c3\Apollo.sln error MSB3202: The project file "..\..\..\Shared Libraries\Local.Web\v2\Local.Web.csproj" was not found. 
[09:32:36]: [Project "Apollo.sln" (Rebuild target(s)):] C:\Program Files\TeamCity\BuildAgent\work\18eca7a0915880c3\Apollo.sln error MSB3202: The project file "..\..\..\Shared Libraries\log4net\root\log4net.csproj" was not found. 
[09:32:36]: [Project "Apollo.sln" (Rebuild target(s)):] C:\Program Files\TeamCity\BuildAgent\work\18eca7a0915880c3\Apollo.sln error MSB3202: The project file "..\..\..\Shared Libraries\Twitterizer\root\Twitterizer.OAuth\Twitterizer.OAuth.csproj" was not found. 
[09:32:36]: MSBuild output: 
[09:32:36]: C:\Program Files\TeamCity\BuildAgent\work\18eca7a0915880c3\Apollo.sln : error MSB3202: The project file "..\..\..\Shared Libraries\Local.Web\v2\Local.Web.csproj" was not found. 
[09:32:36]: C:\Program Files\TeamCity\BuildAgent\work\18eca7a0915880c3\Apollo.sln : error MSB3202: The project file "..\..\..\Shared Libraries\log4net\root\log4net.csproj" was not found. 
[09:32:36]: C:\Program Files\TeamCity\BuildAgent\work\18eca7a0915880c3\Apollo.sln : error MSB3202: The project file "..\..\..\Shared Libraries\Twitterizer\root\Twitterizer.OAuth\Twitterizer.OAuth.csproj" was not found. 
[09:32:36]: Done Building Project "C:\Program Files\TeamCity\BuildAgent\work\18eca7a0915880c3\Apollo.sln" (Rebuild target(s)) -- FAILED. 
[09:32:36]: Done Building Project "C:\Program Files\TeamCity\BuildAgent\work\18eca7a0915880c3\Apollo.sln.teamcity.patch.tcprojx" (TeamCity_Generated_Build target(s)) -- FAILED. 
[09:32:36]: Build FAILED. 
[09:32:36]: "C:\Program Files\TeamCity\BuildAgent\work\18eca7a0915880c3\Apollo.sln.teamcity.patch.tcprojx" (TeamCity_Generated_Build target) (1) -> 
[09:32:36]: (TeamCity_Generated_Build target) -> 
[09:32:36]: ..\..\..\Shared Libraries\Local.Data\v2\Local.Data.csproj : Solution file warning MSB4122: Scanning project dependencies for project "..\..\..\Shared Libraries\Local.Data\v2\Local.Data.csproj" failed. The project file "C:\Program Files\TeamCity\BuildAgent\work\18eca7a0915880c3\..\..\..\Shared Libraries\Local.Data\v2\Local.Data.csproj" was not found. 
[09:32:36]: ..\..\..\Shared Libraries\Local.Web\v2\Local.Web.csproj : Solution file warning MSB4122: Scanning project dependencies for project "..\..\..\Shared Libraries\Local.Web\v2\Local.Web.csproj" failed. The project file "C:\Program Files\TeamCity\BuildAgent\work\18eca7a0915880c3\..\..\..\Shared Libraries\Local.Web\v2\Local.Web.csproj" was not found. 
[09:32:36]: ..\..\..\Shared Libraries\Twitterizer\root\Twitterizer.OAuth\Twitterizer.OAuth.csproj : Solution file warning MSB4122: Scanning project dependencies for project "..\..\..\Shared Libraries\Twitterizer\root\Twitterizer.OAuth\Twitterizer.OAuth.csproj" failed. The project file "C:\Program Files\TeamCity\BuildAgent\work\18eca7a0915880c3\..\..\..\Shared Libraries\Twitterizer\root\Twitterizer.OAuth\Twitterizer.OAuth.csproj" was not found. 
[09:32:36]: ..\..\..\Shared Libraries\log4net\root\log4net.csproj : Solution file warning MSB4122: Scanning project dependencies for project "..\..\..\Shared Libraries\log4net\root\log4net.csproj" failed. The project file "C:\Program Files\TeamCity\BuildAgent\work\18eca7a0915880c3\..\..\..\Shared Libraries\log4net\root\log4net.csproj" was not found. 
[09:32:36]: "C:\Program Files\TeamCity\BuildAgent\work\18eca7a0915880c3\Apollo.sln.teamcity.patch.tcprojx" (TeamCity_Generated_Build target) (1) -> 
[09:32:36]: "C:\Program Files\TeamCity\BuildAgent\work\18eca7a0915880c3\Apollo.sln" (Rebuild target) (2) -> 
[09:32:36]: (Rebuild target) -> 
[09:32:36]: C:\Program Files\TeamCity\BuildAgent\work\18eca7a0915880c3\Apollo.sln : error MSB3202: The project file "..\..\..\Shared Libraries\Local.Data\v2\Local.Data.csproj" was not found. 
[09:32:36]: C:\Program Files\TeamCity\BuildAgent\work\18eca7a0915880c3\Apollo.sln : error MSB3202: The project file "..\..\..\Shared Libraries\Local.Web\v2\Local.Web.csproj" was not found. 
[09:32:36]: C:\Program Files\TeamCity\BuildAgent\work\18eca7a0915880c3\Apollo.sln : error MSB3202: The project file "..\..\..\Shared Libraries\log4net\root\log4net.csproj" was not found. 
[09:32:36]: C:\Program Files\TeamCity\BuildAgent\work\18eca7a0915880c3\Apollo.sln : error MSB3202: The project file "..\..\..\Shared Libraries\Twitterizer\root\Twitterizer.OAuth\Twitterizer.OAuth.csproj" was not found. 
[09:32:36]: 4 Warning(s) 
[09:32:36]: 4 Error(s) 
[09:32:36]: Time Elapsed 00:00:00.60 
[09:32:36]: Publishing artifacts 
[09:32:36]: [Publishing artifacts] Paths to publish: [teamcity-info.xml] 
[09:32:36]: [Publishing artifacts] Publishing files 
[09:32:36]: Build finished 

回答

0

看來問題不在MSBuild中,而是在TeamCity項目配置的版本控制設置中。驗證您希望存在的文件位於構建代理的工作子目錄中。將這些與Visual Studio項目和構建日誌進行比較;驗證路徑是否正確。

您也可以在TeamCity Developer Community上發佈問題。

6

這是一個非常簡單的錯誤 - MSBuild無法找到您正在嘗試構建的項目文件。有針對兩種可能的解釋:

  1. 你沒有檢查這些項目到您的版本控制庫
  2. 您已經檢查過,但不是在這裏的MSBuild期待找到他們的位置。

版本控制中源文件的結構應與您在Visual Studio中本地構建的結構相匹配。如果沒有,你會繼續有問題。

0

我注意到,你的路居然把項目工作目錄之外..假設是正確的:

我得到這個消息,在不同的項目工作完全構建,並在那裏我驗證項目文件在磁盤上。

唯一的區別是「版本控制設置」高級選項部分下的「檢出目錄」名稱。事實證明,路徑模式匹配msbuild無法處理長路徑 ..

我改變了結帳目錄名稱只有三個字母長,它發現項目文件罰款。

+0

關於如何更改結帳目錄名稱,您還有更多詳細信息嗎? – Frazer 2016-06-21 08:05:43

相關問題