可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
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:
- Open
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v11.0\Web\Microsoft.Web.Publishing.targets - Find the
MSDeployPublish target - Inside that task, find the call to the
VSMSDeploy task (line 4376 or so) - 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