Changing the version of Web Deploy used by Visual Studio 2010 SP1

Web Deploy 2.0 (and onwards) supports side-by-side setup. This means you can have multiple versions of Web Deploy installed on the same machine. Visual Studio 2010 SP1 by default uses Web Deploy 2.0, but you can tell it to use a different version of Web Deploy using a project property:

Open your project file and add this property:

<div><span style="color: #0000FF;"><</span><span style="color: #800000;">_MSDeployVersionsToTry </span><span style="color: #FF0000;">Condition</span><span style="color: #0000FF;">="'$(_MSDeployVersionsToTry)'==''"</span><span style="color: #0000FF;">></span><span style="color: #000000;">7.1;8.0</span><span style="color: #0000FF;"></</span><span style="color: #800000;">_MSDeployVersionsToTry</span><span style="color: #0000FF;">></span></div>

Now VS 2010 SP1 will search for version 1.1 (7.1 assembly version) first and stop if it can load it. Otherwise, it will load 2.0 (8.0 assembly version). Note: this property is not valid for VS 2010 (it needs SP1)