I am writing a website in VS2015 using the ASP.NET Preview template. Unfortunately, Dropbox has added a bunch of .dropbox.attr
files in each folder of my project, which the Solution Explorer is displaying:
Note that I have not added them to the project manually, (they are not referenced in my Web.xproj
,) and I do not have "Show All Files" selected. I have already added them to my .gitignore
. There is no "Remove" option when selecting the file:
Lastly, I have tried adding them to my project.json
's exclude section:
...
"publishExclude": [
"node_modules",
"bower_components",
"**.xproj",
"**.user",
"**.vspscc",
".dropbox.attr"
],
"exclude": [
"wwwroot",
"node_modules",
"bower_components",
".dropbox.attr"
]
...
Is there any way to get all files with this name to not appear in my Solution Explorer?
I'm not sure exactly of the interaction between VS2015 and the new project structure, so it could be a result of any of those factors.
With the latest Visual Studio you just need to right-click the folder/file and chose "Hide from Solution Explorer".
That will change the "xproj" this way like Corneliu wrote before:
You can modify the .xproj file of your project and add the following to exclude folders:
You can use
DnxInvisibleFolder
for folders andDnxInvisibleContent
for files. Some folders (like node_modules) have sometimes thousands of folders/files which seem to pose a major problem for VS2015 to scan and load.In a DNX project in visual Studio 2015 the solution explorer does not use the project.json to determine what is shown. The "exclude" properties in project.json are used by dnx to determine which folders/files should be excluded from compilation or publishing but this does not affect Visual Studio's solution explorer.
Generally speaking "everything" is shown but that isn't exactly true as VS excludes certain folders (such as .git, .vs, artifacts, etc). It also adds back others (i.e. bower components is excluded by default from compilation but VS adds it back as a meta folder under dependencies). The "filter" for Solution Explorer is not exposed to the user so it can't be edited or changed by configuration file.
Your best bet would be to request via user voice that some method of configuration be added. Really the functionality is already there it just needs to be made customizable by the user.