TeamCity build does not work, how can I solve "Could not start MSBuild.exe. Could not find project file by path"?

I'm new to TeamCity, trying to get it to build for the first time. I installed TeamCity Professional 8.1.4 (build 30168) and created my first TeamCity project.

Visual Studio's solution is on GitHub. This is a very simple "Hello World" application. It builds and runs locally.

When I submit changes to GitHub, the build starts in TeamCity. Thus, the trigger fires.

Assembly configuration contains one step. This is MSBuild. The path to the assembly file is% env.BUILD_NUMBER%. MSBuild version is Microsoft.NET Framework 4.5, MSBuild ToolsVersion 4, Run Platform x86. The .NET coverage tool is not specified. It should be a simple assembly: Get Latest and create it.

Here is the message:

Failed to start MSBuild.exe. Failed to find project file at path: C:\TeamCity\buildAgent\work\3de96e708f2408e\2

And here is the build log, deleted timestamps:

TeamCity server version is 8.1.4 (build 30168)
Skip checking for changes - there are no VCS roots defined
Agent time zone: America/Chicago
Agent is running under JRE: 1.7.0_51-b13
Publishing internal artifacts
[Publishing internal artifacts] Sending using WebPublisher
[Publishing internal artifacts] Sending using ArtifactsCachePublisher
Clearing temporary directory: C:\TeamCity\buildAgent\temp\buildTmp
Checkout directory: C:\TeamCity\buildAgent\work\3de96e708f2408e
Step 1/1: MSBuild
[Step 1/1] ##teamcity[buildStatisticValue key='buildStageDuration:firstStepPreparation' value='95.0']
[Step 1/1] ##teamcity[buildStatisticValue key='buildStageDuration:buildStepRUNNER_4' value='0.0']
[Step 1/1] Starting: C:\TeamCity\buildAgent\plugins\dotnetPlugin\bin\JetBrains.BuildServer.MsBuildBootstrap.exe /workdir:C:\TeamCity\buildAgent\work\3de96e708f2408e /msbuildPath:C:\Windows\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe
[Step 1/1] in directory: C:\TeamCity\buildAgent\work\3de96e708f2408e
[Step 1/1] Failed to start MSBuild.exe. Failed to find project file at path: C:\TeamCity\buildAgent\work\3de96e708f2408e\2
[Step 1/1] Process exited with code -42
[Step 1/1] ##teamcity[buildStatisticValue key='buildStageDuration:buildStepRUNNER_4' value='792.0']
[Step 1/1] Step MSBuild failed
##teamcity[buildStatisticValue key='buildStageDuration:buildFinishing' value='5.0']
Publishing internal artifacts
[Publishing internal artifacts] Sending using WebPublisher
[Publishing internal artifacts] Sending using ArtifactsCachePublisher
##teamcity[buildStatisticValue key='buildStageDuration:artifactsPublishing' value='30.0']
Build finished
+4
source share
1 answer

The error says that it cannot find the project file for the assembly that it is viewing. C:\TeamCity\buildAgent\work\3de96e708f2408e\2 Perhaps you did not specify the path to the assembly file. You need a setting similar to the one below in your MSBuild Teamcity step.

enter image description here

The path should be relative to the extraction directory.

+6
source

All Articles