Reputation: 25320
We have an old ASP.Net Web Site (not a web project) that has lots of files with the .exclude extension. We maintain this site using Visual Studio 2010 and SVN.
What do these files do? Is it safe to delete them? What does it actually mean to exclude a file in a Web Site?
Upvotes: 4
Views: 2432
Reputation: 13971
If the project is a Web Site, Visual Studio excludes a file from the project by adding an extension ".exclude" to mark it as excluded. So all files will the extension ".exclude" will not be used in the project.
".exclude" extension is only used in ASP.NET Web Site, but not in ASP.NET Web Application.
It is easy to temporarily remove files from the site but still make sure that you do not lose track of them, because they remain in the folder structure. For example, if a page is not ready to be deployed, you can temporarily exclude it from the build without deleting it from the folder structure. You can deploy the compiled assembly, and then include the file in the project again.
This is especially important if you are working with a source control repository.
Upvotes: 2
Reputation: 101132
If you exclude a file from a Web Site project (not Web Application), Visual Studio will simply add the .exclude
extension to that file.
If you remove the extension, that file will be included again.
It's up to you if you still need those files or not.
Upvotes: 3