.NET 8 Upgrade and Microsoft.AspNet.WebApi.Cors 5.3.0

303 Views Asked by At

Problem: We have an app on .NET 6 and with the upcoming 11/4 deadline, we want to move onto .NET 8. When I upgraded the solution's projects, I only had one Nuget package that was flagged as ...not fully compatible with the projectand it was reverted to a legacy version. It was Microsoft.AspNet.WebApi.Core 5.3.0

Q: Is there an alternative for Microsoft.AspNet.WebApi.Core 5.3.0 that people are using for .NET 8, or is everyone just waiting for Microsoft to make it compatible with .NET 8?

ScreenShot

enter image description here Thanks for any insight you guys can offer. Take care!

1

There are 1 best solutions below

1
Juanjo On

EDITED REPLY: Since the Op clarified that he made a typo and wanted the library Microsoft.AspNet.WebApi.Core I can reply that if you look here you will see that similarly to the Microsoft.AspNet.WebApi.Cors the latest version is 5.3.0 and it is from .NET Framework not core.

It just have a very unfortunate name, but a single google search would have pointed to the right direction. If you create a brand new MVC application (deprecated now in favor of Blazor web pages) you will see that it uses theMicrosoft.AspNetCore.Mvc namespace that comes included with .NET 8.

So basically you got confused by the library name and got yourself an incompatible .NET Framework nugget. The reason it works is because it is not used by the application and you get a warning for you to look it up.