It turns out the trailing slash in the PublishDir property is escaping the end quote. Escaping the trailing slash solved my problem.
/p:PublishDir="\\BSIIS3\c$\DATA\WEBSITES\benesys.net\benesys.net\TotalEducationTest\\"
This way we can use quotes for paths that have whitespace in properties that MSBuild requires the trailing slash.
I know this is an old post, but I feel like I needed to share this with someone :-)
SOLUTION
Remove the Quotes around the /p:PublishDir setting
i.e.
Instead of quotes
/p:PublishDir="\\BSIIS3\c$\DATA\WEBSITES\benesys.net\benesys.net\TotalEducationTest\"
Use no quotes
/p:PublishDir=\\BSIIS3\c$\DATA\WEBSITES\benesys.net\benesys.net\TotalEducationTest\
I am sorry I did not post my finding sooner. I actually had to research again to see what needed to be changed. Who would have thought removing quotes would have worked? I discovered this when viewing a coworkers build for another solution and noticed it did not have quotes.
On Git Bash I had to specify the parameters with double slashes like:
MSBuild.exe "Path\to\Solution.sln" //p:Platform="x86" //p:Configuration=Release //p:AppxBundlePlatforms="x86"
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.
You need to put qoutes around the path and file name.
So use
MSBuild "C:\Path Name\File Name.Exe" /[Options]
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!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With