Visual Studio, dependencies, and the Mysterious Yellow Triangle
September 16, 2018 by Michael
If you’ve made significant use of dependencies, odds are you have seen at least one with a small yellow triangle. Visual Studio will give you enough information to figure out why that triangle is being displayed in some cases. However, most of the time you’re left wondering what the problem is.
Clearly the Visual Studio is indicating there is a dependency problem. Unfortunately it doesn’t tell you what that problem is. Instead, Visual Studio will do its very best to resolve the problem for you and allow your solution to build.
I have not been able to find a way to get the Visual Studio to tell me why those yellow triangles are there. If you use the dotnet
tooling via the command line you will get all of the information you need. You can either build the project or simply do a NuGet package restore:
dotnet build -c Debug
dotnet restore
Using dotnet restore
on the above solution results in the following output:
You can clearly see that there is a decency issue with System.ComponentModel.TypeConverter
. Under the covers the problem is being resolved for you when building the solution. Explicitly adding a reference to the package via NuGet will resolve the problem:
Install-Package System.ComponentModel.TypeConverter -Version 4.3.0
If you continue to see dependency issues, rerun the dotnet restore
command. There is a good chance fixing one problem sheds light on another.
If you have resolved all dependency issues displayed via dotnet restore
, try unloading and reloading the project in Visual Studio. Eventually you will be able to remove all of those tiny yellow triangles from your dependencies in Visual Studio.
Helpful Links
You can usually get info about the yellow triangles by increasing the Build output verbosity.
see here https://kb.froglogic.com/coco/howto/visualstudio-verbosity/
There was an updated swashbuckle, and OpenApi was not referenced. Clean and Build worked for me. Thanks