简体   繁体   中英

Setup Project for a Web Application

I have a Setup Project that is creating an installation for an extension of a Web Access (like outlook web access of tfs web access).

The problem is the installation is replacing the original web.config, instead adding/changing corresponding attributes or nodes.

Someone knows how I should create this Setup Project?

Sebastian

Visual studio 2010 introduced web.config transforms that help with such deployment problems.

See this howto video on how it works.

This will still replace the web.config, however, with the values you specify for the environment.

There is no automatic way of doing this. One solution is to rename the web.config in your setup project to something like "web.config.update".

Create a console application which reads in web.config and web.config.update and merges them to a new web.config. Add this application to the setup project and make it run after the install is complete.

But if you are using VS2010 then @Oded´s solution is a better one. Keep a copy of your environments config files inside the project and have the build task transform them for you.

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