Page view counter

Exclude Folder from Website in Visual Studio

Last post 03-05-2009 3:13 PM by jwbthree. 4 replies.

Sort Posts:

  • Exclude Folder from Website in Visual Studio

    11-06-2007, 7:19 PM
    • Loading...
    • jbardrof
    • Joined on 03-22-2007, 11:47 PM
    • Naples FL
    • Posts 192
    • Points 638

    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?

     

    thanks! 

    Remember if you have gotten your answer to mark your thread as answered.
  • Re: Exclude Folder from Website in Visual Studio

    11-06-2007, 11:03 PM
    • Loading...
    • Joël Hébert
    • Joined on 07-20-2005, 6:07 PM
    • Ottawa Canada
    • Posts 679
    • Points 4,623
    • TrustedFriends-MVPs

    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

    Joël Hébert [MVP ASP.NET]

    Opulent ASP Development Inc.
    www.opulentasp.com
    Ottawa,Canada

    Click "Mark as Answer" on the posts that helped you to help future readers to get the solutions
  • Re: Exclude Folder from Website in Visual Studio

    11-09-2007, 12:46 AM
    Answer

    Hi jbardrof,

    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.

     

    Sincerely,
    Benson Yu
    Microsoft Online Community Support

    Please remember to mark the replies as answers if they help and unmark them if they provide no help. This can be beneficial to other community members reading the thread.
  • Re: Exclude Folder from Website in Visual Studio

    06-17-2008, 10:16 AM
    • Loading...
    • dotnet_lee
    • Joined on 08-25-2006, 12:45 PM
    • UK
    • Posts 190
    • Points 455

    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 

  • Re: Exclude Folder from Website in Visual Studio

    03-05-2009, 3:13 PM
    • Loading...
    • jwbthree
    • Joined on 03-19-2008, 4:05 AM
    • Posts 4
    • Points 2

     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. 

     

Page 1 of 1 (5 items)