0
votes

I was given the task to research and implement CI for our small .Net shop. After doing our research, we selected TeamCity to our automated builds. Installing TeamCity and MSBuild was pretty straight forward but the issue is when I started the build. I would always get an error. From the looks of things, it's trying to call the Shared Library project so the first thing I did was edit the VCS to include the Shared Library but that did not resolve the issue.

Please review the log from the build and let me know if I need to configure MSBuild via TeamCity or on VS 2008?

[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
3

3 Answers

7
votes

This is a really straightforward error - MSBuild can't find the project file you're trying to build. There are two possible explanations for that:

  1. You haven't checked those projects into your version control repository
  2. You have checked them in, but not at the location where MSBuild is expecting to find them.

The structure of your source files in version control should match the structure you're using to build locally in Visual Studio. If it doesn't you're going to continue to have problems.

0
votes

It appears that the issue is not in MSBuild but in the Version Control Settings for your TeamCity project configuration. Verify that the files you expect to be there are in the work subdirectory on the build agent. Compare those against your Visual Studio project and the build log; verify that the paths are correct.

You can also post questions on the TeamCity Developer Community.

0
votes

I notice that your paths actually put the projects outside of the working directory.. assuming that is correct:

I was getting this message with a build that worked perfectly in a different project, and where I verified that the project files were on disk.

The only difference was the 'Checkout directory' name under the 'Version Control Settings' advanced options section. Turns out that the path pattern matching in msbuild cant handle long paths..

I changed the checkout directory name to only be three letters long and it found the project files fine.