简体   繁体   中英

How to merge web.config of packages with web deploy (msdeploy)?

These are the steps I performed:

  1. Created two packages: Package.zip and CustomisePackage.zip using msdeploy.

  2. Deployed first package Package.zip to the destination site eg: site/WebDeployment.

  3. Deployed second package CustomisePackage.zip to the same destination site. eg: site/WebDeployment. Skip web.config to be overwritten.

My question is how can I merge web.config from CustomisePackage.zip to the site (site/WebDeployment)?

Does anyone have the same sort of scenario and have the solution for this?

I think you should create different config files for different environment. Before deploying transform your file.

http://msdn.microsoft.com/en-us/library/vstudio/dd465318%28v=vs.100%29.aspx

http://www.hanselman.com/blog/SlowCheetahWebconfigTransformationSyntaxNowGeneralizedForAnyXMLConfigurationFile.aspx

And if you are specifically looking to merge the file after copy the second package at the same location then you should merge tool like WinMerge

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