Why am I getting the following Build error?
C:\\WINDOWS\\Microsoft.NET\\Framework\\v3.5\\msbuild.exe C:\\Code\\EduBenesysNET\\EduBenesysNET\\EduBenesysNET.vbproj /t:pu
This problem appears when you have a path or a property containing a space and that is not quoted.
All your properties and path have quote around them, it's strange. The error message indicates Education
as a switch, try to remove /p:ProductName="Total Education TEST"
to see if it works.
Just in case someone has the same issue as me, I was missing "/" before one of the "/p" arguments. Not very clear from the description. I hope this helps someone.
Yet another cause and solution to this: Check that you didn't put a space in the wrong place, i.e. in parameters; mine was dotnet -c Release - o /home/some/path
(note the space between -
and o
), I kept looking at the path itself, which was correct and threw me off. Hope that helps! (this was in Bash though it should also apply to Windows)
I was using single quotes around the password parameter when I got the error
/p:password='my secret'
bad
and changed it to use double quotes to resolve the issue.
/p:password="my secret"
good
Likely the same would apply to any parameter that needs quotes for values that contain a space.
For me I had forgot to add closing quote
/p:DeployOnBuild=true;OutDir="$(build.artifactstagingdirectory)
to
/p:DeployOnBuild=true;OutDir="$(build.artifactstagingdirectory)"
If you use default workspace in Jenkins, this might occur. Use custom workspace location without any spaces.