Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Using MSDeploy/Web Deploy as Publish method in Visual Studio with multiple users

Is it possible to use web deploy from multiple developer PC's?

When we try to do so it seems we need to re-publish everything when someone else wants to do a deploy.

Are we doing something wrong, is there a way around this, or what would be a recommended approach in our scenario?

I'm aware that deploying from a central location is a better founded solution, but unfortunately this is not an option at the moment.

like image 240
Bertvan Avatar asked Nov 20 '12 08:11

Bertvan


2 Answers

You can't do it from your project, but it's simple to edit the Visual Studio MSBuild scripts to turn it on (for all web deploys). Here's how:

  1. Open C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v11.0\Web\Microsoft.Web.Publishing.targets
  2. Find the MSDeployPublish target
  3. Inside that task, find the call to the VSMSDeploy task (line 4376 or so)
  4. Add the UseChecksum="true" attribute to the VSMSDeploy task call

You can also do this for the deploy preview by following the same steps, but look for the MSDeployFilePreview target in step 2 rather than the MSDeployPublish task.

Make sure to restart VS after you make the changes to ensure they're properly picked up.

UPDATE: MS has added the ability to pass the UseChecksum flag to VS 2013. To do this, add the following property to the .pubxml file:

<MSDeployUseChecksum>true</MSDeployUseChecksum>

Further information can be found here

like image 90
Chris Hynes Avatar answered Sep 20 '22 17:09

Chris Hynes


Using Visual Studio, no. The current build scripts don't have a way of providing the necessary flag to MSDeploy.

If you are using the generated cmd file from a package to perform the deployment you can append -useChecksum to your command line and it will use checksum comparisons rather than the last modified date.

like image 35
Richard Szalay Avatar answered Sep 19 '22 17:09

Richard Szalay