Reputation: 4251
I have an Asp.net 5 project with a package.config in the root. This creates a hidden node_modules folder in the root. Visual Studio can't see it (unless you choose 'show all files') and TFS does not see it.
Using gulp, I copy some files under node_modules to the wwwroot folder so they will be available to my client. I mimic the same structure starting with a node_modules folder in the wwwroot folder. I can't seem to hide these from VS/TFS.
I have a .tfignore file in the wwwroot folder with this line:\node_modules. I have also tried using .tfignore in other places, such as at the solution level. I can't get it too work.
I tried editing the project file and adding DnxInvisibleContent but it seems to only work at the file level and not on the entire folder. I have this entry which is not working:
<DnxInvisibleFolder Include="wwwroot\node_modules\" />
(I also tried DnxInvisibleContent)
I have this is project.json but it's not doing it.
"exclude": [
"wwwroot",
"node_modules",
"wwwroot/node_modules"
]
I am using Visual Studio 2015 with update 1. I don't really have to hide node_modules from VS but I need to hide it from TFS.
This is my project layout. I have one .tfignore at the project level and another inside wwwroot.
solution
-.tfignore
-Angular2Client
----wwwroot
-------node_modules
-------.tfignore
The contents of .tfignore at the solution level is:
\packages
\.vs
\wwwroot\node_modules
The contents of .tfignore in the wwwroot folder is:
\node_modules
Upvotes: 1
Views: 1025
Reputation: 31003
Assuming you are using ASP.NET 5 RC1, it seems this is a known issue with ASP.NET 5 RC1, will be fixed in RC2:
https://github.com/aspnet/Tooling/issues/289
Upvotes: 1