C
C#6mo ago
Stefanidze

What is the up-to-date version of AspNet.WebAPI?

I am upgrading my console application to include Web Api, so i changed the sdk from Microsoft.NET.Sdk to Microsoft.NET.Sdk.Web, and this resulted in project restoring Microsoft.AspNet.WebApi and Microsoft.AspNet.WebApi.Cors. But now when i build or run my project i get warning NU1701 In the output it shows that it cannot restore these two packages with net8.0 but instead they work only with .NET framework. From this i assume that these packages are legacy and need to be replaced, but i couldn't find any information about it. Is there any up-to-date version, for example based on AspNetCore? I use VSCode. Full output of the warning
PrivateBin
Encrypted note on PrivateBin
Visit this link to see the note. Giving the URL to anyone allows them to access the note, too.
3 Replies
Angius
Angius6mo ago
What's the .NET version of your project? Also, it might be easier to just dotnet new webapi and move your existing code there as needed, rather than trying to bolt an API on top of an existing console project
Stefanidze
Stefanidze6mo ago
8.0 For me it's not, because of the differences in the architecture i an doing an update with webapi functionality, refactoring everything from the ground up will be huge amount of work
Angius
Angius6mo ago
Weird... the packages listed in your bin are all .NET Framework packages Which explains the error, but doesn't explain how they got there
Want results from more Discord servers?
Add your server
More Posts