Why am I getting 'Unable to find package Microsoft.AspNetCore.App.Ref.' error?

Richard Wheeler 1 Reputation point
2020-12-09T23:15:35.97+00:00

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?

ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
4,120 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Marcell Nagy 1 Reputation point
    2020-12-11T09:38:19.49+00:00

    Try to clean the solution, then rebuild. Looks like this was a caching problem.

    0 comments No comments