简体   繁体   中英

Why is web.config always udated using web deploy

Im using Visual Studio 2012 and Web Deploy to upload files to a web site.

When I 'Start Preview' in 'Edit Publish Profiles' I always get Web.Config in the list of files that need uploading.

Why is this when web.config has not been changed on my dev PC or on the site?

Note : Im not using we.config transformations in this instance.

My guess is that the web.config transform process updates the last modified date of the files regardless of whether you declare transforms . Since MSDeploy defaults to using last modified as a comparison for performing updates, the file is updated each time.

(Before you ask: you can swap to checksum based deployments if you use msdeploy.exe directly, but not if you use MSBuild)

Web.config is always updated because the system can't do a compare of local vs. remote due to the possibility that a transform will change the contents of the Web.config file. Even if you haven't changed anything in the default transform files or even if you delete the transform files, the system acts as though a transformation is possible.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM