Reputation: 373
How can I exclude web.config (or app.config) file in visual studio installer if it already exist on target machine (and folder)?
Normally, web.config and app.config file contains configuration information related to the particular customer. If they just install setup, their config files will be overwritten. I want to check for existence of configuration file before overwriting them. If config file is already there, I do not want to overwrite it.
Upvotes: 4
Views: 2688
Reputation: 2748
This is pretty simple. From the installer right click on the content from/primary output from project and there is an option of exclude filter. In that just create a new filter and add the files you want to exclude.Then you are done.
Now check your folder where you have installed and you will not find the excluded files there.
For more :http://dataerror.blogspot.in/2010/06/creating-web-setup-project-for-aspnet.html
Hope this helps you.
Upvotes: 6
Reputation: 3565
You can use searches to determine if the files already exist, and then condition the installation of the components that contain the files in the package
Upvotes: 1