user3146344
user3146344

Reputation: 207

Jenkins error: MSB1008: Only one project can be specified

I use Jenkins version 1.500. I simply want to build my asp.net project, but I get this message:

Path To MSBuild.exe: C:\Windows\Microsoft.NET\Framework\v4.0.30319\MSbuild.exe
Executing the command cmd.exe /C C:\Windows\Microsoft.NET\Framework\v4.0.30319\MSbuild.exe %WORKSPACE%\trunk\src\GoldFingers.Uk.sln && exit %%ERRORLEVEL%% from C:\Program Files (x86)\Jenkins\jobs\GoldFingers-Build\workspace
[workspace] $ cmd.exe /C C:\Windows\Microsoft.NET\Framework\v4.0.30319\MSbuild.exe %WORKSPACE%\trunk\src\GoldFingers.Uk.sln && exit %%ERRORLEVEL%%
Microsoft (R) Build Engine Version 4.0.30319.1
[Microsoft .NET Framework, Version 4.0.30319.1]
Copyright (C) Microsoft Corporation 2007. All rights reserved.

MSBUILD : error MSB1008: Only one project can be specified.
Switch: Files

For switch syntax, type "MSBuild /help"
Build step 'Build a Visual Studio project or solution using MSBuild' marked build as failure
Finished: FAILURE

Do you know why it is failure? Maybe the old version od Jenkins? Please, help.

Upvotes: 4

Views: 12768

Answers (1)

Slav
Slav

Reputation: 27505

It seems that because your %WORKSPACE% value has space in it (C:\Program Files (x86)\Jenkins\jobs\GoldFingers-Build\workspace) it breaks it into 2 arguments.

You need to move your Job's workspace to a location that won't have spaces in it. You can do either of the following:

  • Relocate your whole Jenkins' installation out of "Program Files"
  • Or, Use custom workspace (click on the Advanced... button on project configuration page, under Advanced Project Options

Or, update your MSBuild Plugin
According to the plugin wiki page, Release 1.19 fixes:

passing of release configurations with spaces in them

Upvotes: 4

Related Questions