1

In my Visual Studio 2010 SP1Rel, MS web deploy has suddenly stopped workingwith this error:

Unrecognized argument 'Web'. All arguments must begin with "-".

The argument "Web" refers to the parameter "Default Web Site", ie web deploy cannot deploy if the path contains spaces. This worked until today.

If I rename my website to DefaultWebSite (no spaces) then the error message changes to:

Unrecognized argument 'Source=10.10.10.1\MSSQLSERVER,1432;Initial'. 
All arguments must begin with "-".

There are other questions about the same error but the circumstances are different. I am using the built in web deploy dialog.

Same error, but for a batch script: MSDeploy batch file does not handle quotes anymore Same error, but in powershell: How do you call msdeploy from powershell when the parameters have spaces?

These questions are related to installing VS 2010 SP1. I did not install SP1. It might have been automatically installed in a windows update.

How do I solve this error when using the MS deploy dialog (right click the project in VS and click Deploy)?

Community
  • 1
  • 1
JK.
  • 21,477
  • 35
  • 135
  • 214

1 Answers1

1

This was a bug in the way the UseMSDeployExe flag works; it's generating an invalid set of command line parameters for WebDeploy. Try removing that line from your wpp.targets file, and it should work correctly. This bug will be fixed in a future release.

Side note: UseMSDeployExe is mainly intended as a test hook for the VS team to debug issues with WebDeploy. VS has 2 separate modes: In-proc usage of WebDeploy (via reflection I think), and Out-of-proc by shelling out to msdeploy.exe (hence the UseMSDeployExe flag). There's no real benefit to setting UseMSDeployExe, unless you're looking for the command arguments VS is passing to WebDeploy.

Jimmy
  • 27,142
  • 5
  • 87
  • 100
  • Thanks I'll try that. I don't remember why that flag was true, probably due to some earlier problems we had with msdeploy. Its the only flag in my wpp.targets, so I might just remove the whole file. – JK. Jan 12 '12 at 23:47