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
You need to put qoutes around the path and file name.
So use
MSBuild "C:\Path Name\File Name.Exe" /[Options]
This worked for me in TFS MSBuild Argument. Note the number of slashes.
/p:DefaultPackageOutputDir="\\Rdevnet\Visual Studio Projects\Insurance\"
If you are using Any CPU
you may need to put it in single quotes.
Certainly when running in a Dockerfile, I had to use single quotes:
# Fails. Gives: MSBUILD : error MSB1008: Only one project can be specified.
RUN msbuild ConsoleAppFw451.sln /p:Configuration=Debug /p:Platform="Any CPU"
# Passes. Gives: Successfully built 40163c3e0121
RUN msbuild ConsoleAppFw451.sln /p:Configuration=Debug /p:Platform='Any CPU'
Try to remove the trailing backslash or slash at the end of you publish path and install url
/p:PublishDir="\\BSIIS3\c$\DATA\WEBSITES\benesys.net\benesys.net\TotalEducationTest"
/p:InstallUrl="https://www.benesys.net/benesys.net/TotalEducationTest"
You must have hit a special sequence of characters with the \" and (or) /", but I don't know enough in cmd.exe to figure out.
I personnaly always use Powershell : it's way more friendly and powerful!
Hope it helps!
For future readers.
I got this error because my specified LOG file had a space in it:
BEFORE:
/l:FileLogger,Microsoft.Build.Engine;logfile=c:\Folder With Spaces\My_Log.log
AFTER: (which resolved it)
/l:FileLogger,Microsoft.Build.Engine;logfile="c:\Folder With Spaces\My_Log.log"
I did use solution given in https://www.codingdefined.com/2014/10/solved-msbuild-error-msb1008-only-one.html and that solves the issue. All we need to do is check spaces and ''(check backslashes) in the command