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:
<MSDeployUseChecksum>true</MSDeployUseChecksum>
Further information can be found here