Visual Studio Yellow Triangle NuGet Package Missing Dependencies
In case your Visual Studio project had missing package dependencies indicating by a yellow triangle icon at the package like below, you can run the dotnet restore command to get more information about.
![](https://blog.matrixpost.net/wp-content/uploads/2023/01/NuGetPackages001-1024x304.png)
Open the Package Manager Console under Tools –> NuGet Package Manager –> Package Manager Console
![](https://blog.matrixpost.net/wp-content/uploads/2023/01/NuGetPackages002-1024x506.png)
Enter dotnet restore in the console.
dotnet restore
The dotnet restore command uses NuGet to restore dependencies as well as project-specific tools that are specified in the project file
Source: https://learn.microsoft.com/en-us/dotnet/core/tools/dotnet-restore
![](https://blog.matrixpost.net/wp-content/uploads/2023/01/NuGetPackages003-1024x627.png)
The output will give us more details about the missing dependencies. In my case the folder NuGetPackages is missing in the predefined path.
error NU1301: The local source ‘C:Program Files (x86)Microsoft Visual StudioSharedNuGetPackages’ doesn’t exist.
![](https://blog.matrixpost.net/wp-content/uploads/2023/01/NuGetPackages004-1024x704.png)
To resolve the issue I just had to create the folder in the mentioned path and the next run from the dotnet restore command was successfully and the missing dependencies are gone.
![](https://blog.matrixpost.net/wp-content/uploads/2023/01/NuGetPackages006-1024x506.png)
Links
dotnet restore
https://learn.microsoft.com/en-us/dotnet/core/tools/dotnet-restoreInstall and manage packages in Visual Studio using the NuGet Package Manager
https://learn.microsoft.com/en-us/nuget/consume-packages/install-use-packages-visual-studioCreate .NET apps faster with NuGet
https://www.nuget.org/