Msbuild: Problem with special characters ampersand

Created on 2 Apr 2018  路  2Comments  路  Source: dotnet/msbuild

I am having a problem when i need to use the ampersand for a password.

Following an example
Service.deploy.cmd /y /M:SERVER3670 /U:user-deploy-test /P:PassTe-&&&&Ld9

So, i got this error
&& was unexpected at this time.

I have also tried to use the escape ^, but did not work.

Do you have any suggestion for this case?

Most helpful comment

You can URI-escape characters for MSBuild. Try using %26 for each & character.

All 2 comments

You can URI-escape characters for MSBuild. Try using %26 for each & character.

Tks, it worked

Was this page helpful?
0 / 5 - 0 ratings