How to get ASP.NET website precompilation to exclude a certain folder

735 views Asked by At

The several different environments (e.g. live, demo etc) of my web app are differentiated by config settings in a folder called EnvironmentConfiguration. Whenever I update one of the sites, I delete the EnvironmentConfiguration folder from the precompiled site before copying the website files over (i.e. in order that the EnvironmentConfiguration folder in the deployment location is not replaced).

Just to save mistakes, is there a way I can get Visual Studio not to produce the EnvironmentConfiguration folder when it precompiles the site for me?

1

There are 1 answers

2
WraithNath On

You could try a couple of things.

1) Right click on the folder in the solution and select exclude from Project.

2) Look at each of the files in the folder and set the BuildAction property to 'None' rather than 'Content'