Try to clean the solution, then rebuild. Looks like this was a caching problem.
Why am I getting 'Unable to find package Microsoft.AspNetCore.App.Ref.' error?
Richard Wheeler
1
Reputation point
I am running Visual Studio 2019 and trying to develop a .NET Core 3,1 ASP MVC application. I was working just fine yesterday but this morning I opened my project and began getting 'Unable to find package Microsoft.AspNetCore.App.Ref.' error and Unable to find package Microsoft.NETCore.App.Host.win-x64 errors.
My project is file is as follows:
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
</PropertyGroup>
</Project>
What happened? How did I lose these packages and how can I get them back?