Take the 2-minute tour ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

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)

share|improve this question
add comment

2 Answers 2

up vote 1 down vote accepted

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.

http://stackoverflow.com/questions/13468852/using-msdeploy-web-deploy-as-publish-method-in-visual-studio-with-multiple-users

share|improve this answer
add comment

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: http://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.

share|improve this answer
    
Thanks for the reply, but I think the source you quoted is no longer accurate. Please take a look at the 'usechecksum' flag here: technet.microsoft.com/en-us/library/dd569089(v=ws.10).aspx –  shannon Mar 29 '13 at 20:54
    
Side note, of course scanning a file locally for checksum is faster than copying the file over most internet connections, and doesn't need to lock files besides. –  shannon Mar 29 '13 at 20:55
    
p.s. thanks also for the suggestion of publishing multiple identical sites –  shannon Mar 29 '13 at 20:59
    
I see. Well, I'm pretty sure this can be configured, given that Visual Studio is highly customizable, but it seems that there is no straightforward way to do it through Visual Studio Package/Publish Web tab itself. I'm currently looking for an alternative. –  MainMa Mar 29 '13 at 21:12
    
There is some change from VS2010 to VS2012 to move where web publish settings are stored, so that they can now be shared by a team. I don't see where that is, but I was hopeful I might be able to stick flags in there. –  shannon Mar 29 '13 at 21:29
show 1 more comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.