4

Visual Studio 2015 is not ignoring bower_components folder although it is ignoring node_modules so I don't know what is wrong.

This is the content of my project.json

{
  "webroot": "wwwroot",
  "version": "1.0.0-*",

  "dependencies": {
    "Microsoft.AspNet.Mvc": "6.0.0-beta7",
    "Microsoft.AspNet.Server.IIS": "1.0.0-beta7",
    "Microsoft.AspNet.Server.WebListener": "1.0.0-beta7",
    "Microsoft.AspNet.StaticFiles": "1.0.0-beta7"
  },

  "commands": {
    "web": "Microsoft.AspNet.Hosting --config hosting.ini"
  },

  "frameworks": {
    "dnx451": { }   
  },

  "exclude": [
    "wwwroot",
    "node_modules",
    "bower_components"
  ],
  "publishExclude": [
    "node_modules",
    "bower_components",
    "**.xproj",
    "**.user",
    "**.vspscc"
  ]
}

How can I force VS 2015 to hide bower_components folder from the project's tree?

I am also strugling with TFS 2013 because I am unable to ignore folders from being tracked for changes. I have tried .tfignore but that didn't work.

Sul Aga
  • 6,142
  • 5
  • 25
  • 37
  • 1
    I am having the exact same issue. node_modules and bin folders are removed but bower_components stay. This is causing me a huge problem because resharper, intellisense, and other tools I use continually want to "process" this folder, rendering VS useless. – Matt Overall Oct 14 '15 at 20:27
  • if you are using Git, you need to provide that to your gitignore file. Some people say that bower components should be on version control others don't. Depends on what will happen if the package gets deleted from github :D – Bart Calixto Oct 14 '15 at 23:38
  • hi @MattOverall, check the answer below. – Sul Aga Oct 16 '15 at 13:38

1 Answers1

3

This issue is now 'fixed' by using the 'Hide from Solution Explorer' option which becomes available with the ASP.NET 5 beta 8 release.

enter image description here

enter image description here

Please follow this link for more information. Please check the "New Visual Studio 2015 Features for ASP.NET 5" section on that page.

Follow this link to download the update and install it for Visual Studio 2015

Sul Aga
  • 6,142
  • 5
  • 25
  • 37
  • Thanks for the update. Good to know I wasn't missing anything obvious. Do you know by chance how the bin and node_modules were being hidden? – Matt Overall Oct 19 '15 at 18:47
  • it is not obvious how they are hidden but it seems that there are a list of predefined folders which VS2015 ignores by design like bin and node_modules – Sul Aga Oct 26 '15 at 09:28
  • 1
    Maybe I don't understand the answer, but this just hides the file in solution explorer. They're still not ignored by TFS and are still get added to pending changes. – Bas May 02 '16 at 09:25