Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

We have a few big projects which we use Publishing with in VS2010 with IIS7. We are publishing with the "Web Deploy" options. Now when User1 publishes for the very first time all files will be uploaded, will this user make an alteration in a file and publish again only the changed file will be published. But User2 is publishing later (same project), but VS/IIS will upload ALL files again, while maybe only 1 file was changed. After uploading all the files again, User1 will again have to upload ALL files too!

Very annoying behavior and projects with sizes of 200mb take almost 30 minutes to publish. Is there a setting that IIS/VS can check better if a file has changed or not?

share|improve this question

1 Answer 1

You need only to publish once per application/machine (although you can publish on a per root conf/machine). Afterwards (At least in Web Deploy 2.0) you can synchronise by doing msdeploy -verb:sync -source:webServer -dest:webServer,computerName=Server2

It is explicitly mentioned that

A sync operation gets a dump of the source, a dump of the destination, and then does a node-by-node comparison of the results. Rules and link extensions check every node to determine what must be added, deleted, or updated. For more information about rules and link extensions, see Web Deploy Rules and Web Deploy Link Extensions.

EDIT 1: The point of msdeploy is so it could be part of continuous integration. You can probably write a nice script that will be executed everytime you make a build. Having said that if you go to VS post build events you can add that script. The problem you mentioned might be an ACL and I guess you can either ignore it by ignoreError or make a final deploy that will resolve the ACL from one user and then sync from that user only. The latter will increase security as well.

share|improve this answer
    
Ok I will look into this, but does it mean it will upload all files first before it will compare, or will it use a filelist? –  Rogier21 Sep 19 '11 at 14:27
    
It will use a 'filelist',compare source and dest by doing a dump and CRUD accordingly, thus keeping everything into sync but NOT by copying everything over. It also gives quite a nice output. This could also be of use jeffreypalermo.com/blog/… –  user Sep 19 '11 at 15:31
    
shame that this cannot be configured directly in Visual Studio 2010.. –  Rogier21 Sep 19 '11 at 20:41
    
i tried to get your solution to work but it does not. I get the error: Verbose: Source filePath (213_6.png) does not match destination (Deploy Static\213_6.png) differing in attributes (lastWriteTime['07/26/2011 07:55:21','07/21/2011 10:56:43']). Update pending. It still tries to update the file because another user has published before to this point. –  Rogier21 Sep 20 '11 at 6:37
    
I have update my answer. –  user Sep 20 '11 at 11:38

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.