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

匿名 (未验证) 提交于 2019-12-03 01:48:02

问题:

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.

回答1:

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.



回答2:

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:

true

Further information can be found here



标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!