MSBUILD: error MSB1001: unknown switch Switch: / Y

I use city commands for automatic deployment, and MSBuild will not work ... At the construction stage, the command line parameters are as follows: ProjectName.deploy.cmd / y / M: https: // [WebDeployUrl: 8172] /MsDeploy.axd/ u: username / password: -allowUntrusted / A: basic

this works fine from my machine, but the build server does not work with the following answer: [MSBuild output] MSBUILD: error MSB1001: unknown switch. [MSBuild Output] Switch: / Y

Anyone have an idea about this?

+4
source share
1 answer

This is a very old question, and the questionnaire probably sorted out their problem a long time ago, but here anyway:

MSBuild tasks in TeamCity require a command line related to MSBuild.exe, in particular, IIRC.

That is, TeamCity executes MSBuild.exe with the parameters that you specified as follows:

msbuild.exe ProjectName.deploy.cmd /y /M:https://[WebDeployURL]:8172]/MsDeploy.axd /u:username /p:password -allowUntrusted /A:basic 

Of course, MSbuild does not know what these switches are, and will not be able to process "ProjectName.deploy.cmd" as an MSBuild file.

0
source

Source: https://habr.com/ru/post/1502474/


All Articles