I just installed a package through NuGet, but it shows a yellow exclamation mark icon in my Solution Explorer, see screenshot below.
Why does this happen, and how can I resolve it?
After you enable package restore in Options, you can right-click the solution in Solution Explorer and select Restore NuGet Packages to restore packages anytime. If you enabled automatic restore in Options, Package Restore happens automatically when you create a project from a template or build a project.
Put simply, a NuGet package is a single ZIP file with the . nupkg extension that contains compiled code (DLLs), other files related to that code, and a descriptive manifest that includes information like the package's version number.
Invoke the Package Manager dialog (select Tools > NuGet Package Manager > Manage NuGet Packages for Solution). Go to the Updates tab. Select the packages you want to update (or use the Select all packages to update all packages) and click Update.
Many times it is just that Visual Studio is out of sync. Closing the solution and re-opening will magically fix these errors in many cases. It's easy enough that it should be one of the first things you try.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With