locked
Exclude folder from visual studio 2015 solution explorer RRS feed

  • Question

  • I am trying to exclude/hide the bower_components folder in the solution explorer for Asp.Net 5.0 projects. I note that the node_modules folder is already excluded by default, and I am confused as to why the bower_components folder is not as excluded as well. In Visual Studio 2013 I was able to exclude a folder via the right-click context menu.

    I can already see a list of bower packages installed under the Dependencies node, so I would like to hide the bower_components folder.

    The same question has already been asked on Stackoverflow (http://stackoverflow.com/q/32791684/896265), but no answer has been posted. I thought I would try my luck here.

    Thursday, October 22, 2015 12:14 PM

Answers

  • Hi Blake Mumford,

    Yes, the "Exclude from Project" option in right-click context menu has been romove in Visual Studio 2015 ASP.NET 5 template. Because there has a new feature of project.json file in ASP.NET 5 template.

    Thera has a "exclude" section which is used to identify files and folders that should be excluded from builds. And another section of "publishExclude" which is used to identify files and folders that should be excluded from publish. More information abouth this file, please read this document.

    http://docs.asp.net/en/latest/conceptual-overview/understanding-aspnet5-apps.html#the-project-json-file

    So I'm afraid that we can't exclude/hide the bower_components folder in the solution explorer for ASP.NET 5 projects. But the "Exclude from project" in right-click context menu still can exist in other ASP.NET project.

    Best Regards,
    Weiwei

    • Proposed as answer by Weiwei Cai Friday, October 30, 2015 9:31 AM
    • Marked as answer by Weiwei Cai Monday, November 2, 2015 1:06 PM
    Friday, October 23, 2015 3:24 AM