What does the small preceding red minus icon mean in my Visual Studio Solution Explorer?
Recently a preceding small red icon started to appear before some of my VS 2015 Solution Explorer. I definitely remember it was not there some days before.
I think it has something to do with git source control what I am using (not sure), but can not figure what is it.
- How do I use a localized PostBuildEvent in an environment with multiple collaborators?
- Visual Studio 2015 commits automatically after “Add solution to source control”
- Visual Studio Solution from multiple git repositories
- Visual Studio and libgit2 Git Commit Error In Different Solution
- switching branches does not refresh solution explorer visual studio
- Should a .sln be committed to source control?
* edit *
Added more diagnostics:
- The files can be opened by double click
- The tracking does not work for these files (I mean not activated in Solution Explorer when switching to the editor tab for that file)
- Editing and saving does not help
- Close/Reopen VS does not help
- Refresh does not help
* end edit *
3 Solutions collect form web for “What does the small preceding red minus icon mean in my Visual Studio Solution Explorer?”
According to the version control icon documentation, it indicates files that have been excluded from version control, for example in the
However, in my case with Visual Studio Community 2015 Update 2, those icons also show up when I create a new project. Even if none of the created files are explicitly ignored through
.gitignore. The icons disappear once I’ve committed the changes.
When you create a visual studio project and select the “add to source control” option and you are using Git, Visual studio automatically generates a .gitignore file.
The .gitignore file contains a large amount extensions and directories. For instance:
- User-Specific files such as *.suo, *.user etc.
- Build Results, DNS artifacts
- Profiler, Resharper, JustCode and TeamCity and many other add-ins artifacts
- SQL Server files *.mdf and *.ldf
I think you get the idea, you can open the .gitignore and view it yourself.
You can right-click on the file that is being ignored and include it in your source if you wish.
This is the behaviour in Visual Studio 2015. I haven’t confirmed if this is the behaviour in previous Visual Studio editions.
I think I managed to figure out what is going on here.
The (-) symbols next to each of your files/projects represent files that are ignored by
From what I am seeing in your project, this would mean that you ignored the files in your
As for the (-) symbol next to your solution, I think this means that you have also ignored your
.sln in your
Likewise, if you were to add the
.csproj files in your
.gitignore, I would expect a (-) symbol next to your projects like
Hope this helps.