Last post Jul 03, 2013 06:55 PM by pbulloch
Nov 06, 2007 11:19 PM|jbardrof|LINK
For projects such as forms apps and class libraries you can exclude folders which reside in the directory from the project. That menu option does not seem to exist when you create a website in VS 2005, is there any way to do it?
Nov 07, 2007 03:03 AM|Joël Hébert|LINK
i see what you mean a class library has exclude from project and i was looking at the vc web project and i cant see anything for folder exclusion
Nov 09, 2007 04:46 AM|Benson Yu - MSFT|LINK
This is the by design behavior of website type project (The web application type project still has the “Exclude From Project” menu item). It’s because website project lack of the project file. The include/exclude information store in the web application
project file (*.csproj) but website project doesn't have it.
To workaround this issue, we can set “Hidden” attribute for the file/folder which you want to exclude from project, and the refresh the project in Solution Explorer. For example:
1. Open Windows Explorer.
2. Local to the physical folder of your website.
3. Right click the file/folder which you want to exclude, and then select “Properties”.
4. Check the “Hidden” attribute.
5. Click the “Refresh” button in the Visual Studio 2005 Solution Explorer.
Jun 17, 2008 02:16 PM|dotnet_lee|LINK
I have the same problem, but its a pain having to keep hiding the folder everytime I need to bvuild the project - In the end I just excluded all the files in the folder individually
Mar 05, 2009 07:13 PM|jwbthree|LINK
You can exclude the top level folder only and Visual Studio will not read the files under that directory. This is quicker than hiding the top level folder and the sub folders.
Oct 29, 2009 11:14 AM|Achaemenidian|LINK
Simply convert those folder(s) into "application" in IIS and VS won't load those folders anymore.
May 21, 2010 06:40 PM|charliemonte|LINK
Nice, thanx Benson Yu!!!
Aug 23, 2010 06:24 PM|diomedes|LINK
Ok, This is an old post, but since I found it looking for the answer....
What work for me, on VS2010 was to change the folder name and add an _ to it.
thus making it a private/invisible folder.
Mar 16, 2011 05:36 PM|clevy|LINK
Simply adding and underscore to the folder name does NOT exclude it from a publish of the website in VS 2010
Jul 03, 2013 06:55 PM|pbulloch|LINK
Simply brilliant. Many thanks.