开发者

Can MSDeploy deploy only new or changed files?

I i开发者_JAVA百科ntend to use the web deploy feature of ASP.NET 4.0 for my site. Does anyone know if this feature does incremental deployments (i.e. only deploy changed or new files in the solution)?

Thanks


MSDeploy does deploy only the new or changed files by default. But I've stumbled upon this question when I had found that for me it wasn't the case. I was using Angular CLI that copies the assets folder as-is, but file dates are lost on the way. And MSDeploy by default uses file dates to determine if a file had changed.

Here I've found a way to force MSDeploy to use checksums instead of file dates. You just need to add <MSDeployUseChecksum>True</MSDeployUseChecksum> in your first PropertyGroup in your .pubxml file (publish profile). Or, if you don't use a .pubxml file and use msdeploy directly instead, just supply a /p:MSDeployUseChecksum=true argument when invoking it. Works like a charm for my temporarily slow internet connection: reduced the deploy from 10 minutes to 10 seconds (most of the assets never change). Yay!


Yes it does. It is really fast, also for solutions with many directories.

I've seen the deployment time of a big solution being reduced from 30 minutes to about 5. For smaller projects, the incremential deploy is done within seconds.

Edit: Due to several call backs: Have a look at this screenshot:

Can MSDeploy deploy only new or changed files?

Check out the radio buttons. (The image is taken from an article about web config transforms, that I've written in the past. Check out this link if you want to see the context of this screenshot)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜