Since I updated to Bamboo 5.5 is receive MSB1008 error
Asked by Philip Steinebrunner:

I changed nothing on my build script/task, but replaced Bamboo 5.4 with Bamboo 5.5. Thats very anoying. Any suggestions?

[](http://msdn.microsoft.com/de-de/library/f11s62yy%28v=vs.90%29.aspx)[http://msdn.microsoft.com/de-de/library/f11s62yy%28v=vs.90%29.aspx](http://msdn.microsoft.com/de-de/library/f11s62yy%2528v=vs.90%2529.aspx)

The following command dont work within Bamboo, but in the Windows Command.

```
Beginning to execute external process for build 'xxx'... running command line:C:\Program Files (x86)\MSBuild\12.0\Bin\MSBuild.exe /nologo /nr:False /p:Configuration=Debug /p:Platform="Any CPU" /verbosity:normal /p:DeployOnBuild=True /p:DeployTarget=Package /p:PackageLocation="D:\Atlassian\Application-Data\Bamboo\xml-data\build-dir\xxx\Deployment\MSDeployPackage.zip" /p:BuildNumber=119 /p:Version=0.9 "D:\Atlassian\Application-Data\Bamboo\xml-data\build-dir\xxx\Solution\xxx.sln"
```

Update:

Ok I found out that Bamboo now erases the quotes from the arguments. /p:Platform="Any CPU" needs to be quoted as its throwing the MSB1008 error if its not quoted!


Answers:
author: Krzysztof Najda
body: I've faced same issue.

Workaround: remove double quotes and escape spaces with %20

Ex.: /p:Platform=Any%20CPU

<br />


author: Rainer Wiesenfarth
body: I found a workaround for us, kind of ugly but at least we get our builds done:

Prior to the MSBuild task we run a script that generates a msbuild.rsp file in the directory where the solution lies, include all options there and start the MSBuild task without any options.


author: David FALLAS
body: Please note: this is NOT just for the `Options` field in a job - it also applies to the `Project File` field for a job running MSBuild. If the `Project File` contains a path which contain directory name(s) with spaces, the build will fail with the MSB1008. We had to do a major refactor of the locations of many MSBuild .targets files that our Bamboo system uses.


author: Krystian Brazulewicz
body: Please check [this comment](https://jira.atlassian.com/browse/BAM-11561?focusedCommentId=642844&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-642844) for a solution. In short:

Bamboo 5.6.0 provides workaround for the argument parsing problems in form of **optional** use of msbuild's response file. In order to activate this workaround one needs to set   
`bamboo.plugin.dotnet.msbuild.useResponseFile` system property to `true` on all agents (and on Bamboo server if you use local agents).

comments: author: Swift Capital
body: Doesn't work for non-MSBuild commands with the same issues, like MSDeploy.


author: Krystian Brazulewicz
body: We've published 5.6.0 version of the plugin. It should solve the problem you've described here. Please look at [this comment](https://jira.atlassian.com/browse/BAM-11561?focusedCommentId=623138&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-623138) for more details.


author: Isaac Davidson
body: This has had a major effect on us. All builds now break. I already was attempting to use %20 and for that reason stumbled upon this post.

%20 does **not** work for us. Towards the end of the build, a different error is produced:

<br />

error MSB4025: The project file could not be loaded. Could not find file "C:\\...\\Project.sln" (default target) (1) -\> "C:\\...\\Project.csproj.metaproj" (default target) (33) -\> C:\\...\\Project.csproj.metaproj : error MSB4025: The project file could not be loaded. Could not find file 'C:\\...\\Project.csproj.metaproj'.

I'll be temporarily switching over to a script to alleviate the situation. I'm not sure at this point if this has been brought to the attention of the Bamboo team and logged?

comments: author: Philip Steinebrunner
body: Have a look at this

<https://jira.atlassian.com/browse/BAM-11561>


author: Swift Capital
body: Doesn't work for non-MSBuild commands with the same issues, like MSDeploy.


author: chris spencer
body: I'm now receiving this error due to Bamboo OnDemand being upgraded to 5.5 over the weekend. All build plans broken. Workaround above (using %20) not working for me.

For now I will be removing /p:Platform="Any CPU" from command line just to get things working. I think MSBuild should default to whatever is specified in the solution.


author: Rainer Wiesenfarth
body: Does not work for us. If we use MSBuild Options:
> /t:Rebuild /p:Configuration="UAS Release";Platform=x64;TrackFileAccess=false /m /clp:NoItemAndPropertyList;ErrorsOnly;ShowTimestamp

we get Error MSB1008. If we quote like suggested:
> /t:Rebuild /p:Configuration=UAS%20Release;Platform=x64;TrackFileAccess=false /m /clp:NoItemAndPropertyList;ErrorsOnly;ShowTimestamp

we get a Bamboo internal error:

System Error Details {#toc-hId-1878275063}
==========================================

*[Build Inpho Software - UASMaster Trunk - Build software and package it 467](http://usd-am-dat-06.am.trimblecorp.net:8085/bamboo/browse/IS-UASNIGHT-JOB1-467) :* Error occurred while running Task 'Build the software itself(2)' of type com.atlassian.bamboo.plugin.dotnet:msbuild.  
(java.util.UnknownFormatConversionException : Conversion = 'R')

<br />

Occurred: 27 May 2014, 6:13:52 AM   
Agent: [](http://usd-am-dat-06.am.trimblecorp.net:8085/bamboo/agent/viewAgent.action?agentId=7503875)[DES-BUILDER.eu.trimblecorp.net](http://DES-BUILDER.eu.trimblecorp.net)

*** ** * ** ***

```
java.util.UnknownFormatConversionException: Conversion = 'R'	at java.util.Formatter$FormatSpecifier.conversion(Unknown Source)	at java.util.Formatter$FormatSpecifier.<init>(Unknown Source)	at java.util.Formatter.parse(Unknown Source)	at java.util.Formatter.format(Unknown Source)	at java.util.Formatter.format(Unknown Source)	at java.lang.String.format(Unknown Source)	at com.atlassian.bamboo.task.TaskResultBuilder.checkReturnCode(TaskResultBuilder.java:155)	at com.atlassian.bamboo.task.TaskResultBuilder.checkReturnCode(TaskResultBuilder.java:137)	at com.atlassian.bamboo.plugin.dotnet.msbuild.MsBuildTaskType.execute(MsBuildTaskType.java:99)	at com.atlassian.bamboo.task.TaskExecutorImpl.executeTasks(TaskExecutorImpl.java:220)	at com.atlassian.bamboo.task.TaskExecutorImpl.execute(TaskExecutorImpl.java:98)	at com.atlassian.bamboo.build.pipeline.tasks.ExecuteBuildTask.call(ExecuteBuildTask.java:75)	at com.atlassian.bamboo.v2.build.agent.DefaultBuildAgent.build(DefaultBuildAgent.java:186)	at com.atlassian.bamboo.v2.build.agent.BuildAgentControllerImpl.waitAndPerformBuild(BuildAgentControllerImpl.java:102)	at com.atlassian.bamboo.v2.build.agent.DefaultBuildAgent$1.run(DefaultBuildAgent.java:108)	at com.atlassian.bamboo.utils.BambooRunnables$1.run(BambooRunnables.java:49)	at com.atlassian.bamboo.security.ImpersonationHelper.runWith(ImpersonationHelper.java:31)	at com.atlassian.bamboo.security.ImpersonationHelper.runWithSystemAuthority(ImpersonationHelper.java:20)	at com.atlassian.bamboo.security.ImpersonationHelper$1.run(ImpersonationHelper.java:52)	at java.lang.Thread.run(Unknown Source)
```


author: Philip Steinebrunner
body: Ok I found out that Bamboo now erases the quotes from the arguments. /p:Platform="Any CPU" needs to be quoted as its throwing the MSB1008 error if its not quoted!