TeamCity builds are failing, how do I resolve “Failed to start MSBuild.exe. Failed to find project file at 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) yesterday and set up my first TeamCity project.

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

When I submit a change to GitHub, the build in TeamCity is triggered. So, the trigger works.

The build configuration contains one step. It's MSBuild. The Build File Path is %env.BUILD_NUMBER%. The MSBuild Version is Microsoft .NET Framework 4.5, MSBuild ToolsVersion 4, Run Platform x86. No .NET coverage tool specified. This should be a simple build: Get Latest and build it.

The Build Server and Build Agent are on the same machine, my developer laptop. This won't always be the case but it is for now, until I get TeamCiy figured out.

I'm also using the default internal database.

Here is the message detail:

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


And here is the build log, timestamps removed:

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


Thanks!

1 comment
Comment actions Permalink

Hi,

In Build File path you need to specify the path to the solution to be built relative to the Build Checkout Directory, path to .sln file. Please read more about MSBuild runner options.

0

Please sign in to leave a comment.