Clear All NuGet Cache VS 2017

If you installed newly released version of Visual Studio 2017 and started a fresh ASP.NET Core project targeting .NET Core, you might encounter the below error message.

The type or namespace name ‘System’ could not be found (are you missing a using directive or an assembly reference?)

Also, looks like there are problems with NuGet packages as in below screenshot

This is very strange. Looks like the problem was due to NuGet package source pointing to a folder under Visual Studio 2015 (previous version) folder.


Go to Tools | NuGet Package Manager | Package Manager Settings – checked ‘Allow NuGet to download missing packages’ and ‘Automatically check for missing packages during build in VS’ and then clicked ‘Clear All NuGet Cache(s)’. Then re-built the solution.

Reference screen below:

Once done, It will load all the required packages from the latest referenced path – Build/Run works perfect.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.