Migrating API Core 3.1 to 5.0

PauloRogrioMartins-3119 1 Reputation point
2022-11-17T20:25:08.393+00:00

When migrating I am getting this error, any suggestions?

It looks like the Microsoft.AspNet.Identity package doesn't support .Net 5.0

Developer technologies | ASP.NET | ASP.NET Core
{count} votes

1 answer

Sort by: Most helpful
  1. Michael Taylor 60,161 Reputation points
    2022-11-17T21:16:48.07+00:00

    Correct. With very few exceptions none of the Microsoft.AspNet assemblies will work as they all are for .NET Framework. .NET Core/6 apps use Microsoft.AspNetCore. For Identity you should use Microsoft.AspNetCore.Identity as discussed here. Note that this is not just a simple change in packaging. You'll need to migrate your system as well so be sure to read the docs.

    Also note you shouldn't be referencing Microsoft.AspNet.WebApi anymore either. If you are using this just for the HttpClient helpers then there is a new package for that.

    Finally be aware that .NET 5 is out of support. You need to go ahead and upgrade to .NET 6 as well. No reason to target .NET 5.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.