Mobile app version of vmapp.org
Login or Join
Eichhorn148

: VS2012 One-Click Web Publish using file hashes instead of timestamps We have have a small ASP.NET MVC web application that we develop and publish to a remote server using Visual Studio One-Click

@Eichhorn148

Posted in: #Iis #Publishing #SiteDeployment

We have have a small ASP.NET MVC web application that we develop and publish to a remote server using Visual Studio One-Click Web Publishing. We maintain our code in revision control, make edits, and trust one another on our small team to follow publishing guidelines both to test and production.

However, when we switch from one to another publisher, the whole site gets republished because timestamps are different, both on the source files (due to SVN functionality) and binaries (pretty much unavoidable), resulting in a lengthier process and downtime.

I know there are MSDeploy flags to publish using file hashes instead. Is there a way to enable these for use from the One-Click Publish interaction?

(see 'usechecksum' at Web Deploy Operation Settings for information on this flag)

10.02% popularity Vote Up Vote Down


Login to follow query

More posts by @Eichhorn148

2 Comments

Sorted by latest first Latest Oldest Best

 

@Eichhorn148

Apparently there isn't a way to change it so that these settings are local to the project, but the global operation of VS can be altered.

The answer to the linked question below includes the edit to make this change to your VS.
stackoverflow.com/questions/13468852/using-msdeploy-web-deploy-as-publish-method-in-visual-studio-with-multiple-users

10% popularity Vote Up Vote Down


 

@Sarah324

Currently MSDeploy only uses timestamp/size/attributes to compare whether the files are different. The reason it doesn't use a hash/checksum is just for performance reasons.


Source: forums.iis.net/post/1898370.aspx
So no, you can't use hashes. What you can do, on the other hand, to avoid downtime, is to either have redundant servers, or if you can't afford two servers (or running two virtual machines on a single server), at least have two websites managed by the same IIS server. You can then take offline the first website, update it, bring it back online, take offline the second one and update it.

Note: it appears from the comment of the author of the question that the source is no longer accurate. It is effectively possible to use CRC instead of the timestamp with Web Deploy. It is unclear whether Web Deploy may be customized in Visual Studio to take in account any settings one can use with MSDeploy. Web Deploy: Customizing a deployment package article seems to give some hints. See also How to: Edit Deployment Settingsā€¦ and TeamCity, Subversion & Web Deploy part 3: Publishing with Web Deploy.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme