Is the nuget package Microsoft.AspNet.WebApi.Core 5.2.7 compatible with .Net Core 2.2? - asp.net-core

I am getting the following warning in my .NET Core 2.2 application:
Warning NU1701 Package 'Microsoft.AspNet.WebApi.Core 5.2.7' was restored using
'.NETFramework,Version=v4.6.1' instead of the project target framework
'.NETCoreApp,Version=v2.2'.
This package may not be fully compatible with your project.
Are there any alternatives for this package?

As said in comments, this is not needed for a ASP.NET Core project. Remove it via NuGet and you should be good to go.

Related

Esri.ArcGISRuntime nuget package is not supported for netcoreapp2.2

I'm trying to use the following classes CredentialRequestInfo and Credential.
And as mentioned in ArcGIS Developers, in order to use the classes we need to install Esri.ArcGISRuntime nuget package.
But when installing the package, I get the following error:
The 'Esri.ArcGISRuntime' nuget package is not supported for the Target Framework 'netcoreapp2.2'
Is there a work-around we can do in order to use this nuget package? Or is there any updates or what?
After searching and talking with developers in esri. Found out that to use this nuget package I have to use .net core 3.1.
Esri.ArcGISRuntime will not work with .net core 2.2.

Why does netcore3.1 framework cause this error?

I have an aspnetcore api project I wrote in .net core 2.2, and changed the targeted framework in the csproj file to .net core 3.1. The project now has the following error (NETSDK1):
The Microsoft.AspNetCore.All package is not supported when targeting .NET Core 3.0 or higher. A FrameworkReference to Microsoft.AspNetCore.App should be used instead, and will be implicitly included by Microsoft.NET.Sdk.Web.
C:\Program Files\dotnet\sdk\3.1.100\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Sdk.DefaultItems.targets
The Nuget Viewer for the project has no such project listed, and the error is occurring in a file outside my project. Does anyone know how to fix this?

How to update from Microsoft.NetCore.App 2.0 to 2.1.4

I created an ASP.NET Core Web API project in Visual Studio 2017 version 15.7.2.
When I created it, it was Microsoft.NetCore.App 2.0.
Now I want to update to Microsoft.NetCore.App 2.1.4 but I can't because Visual Studio tells me:
Implicitly referenced by an SDK. To update the package, update the
SDK to which it belongs
I download the latest version of .NET Core and I installed it, but I got the same issue.
Any ideas?
Don't confuse SDK (=> Build tools) versions with .NET Core versions.
The 2.1.* SDK versioning was unfortunate, the versioning scheme has since been changed and the scheme transition will be (mostly) complete with the release of .NET Core 2.1.
You don't need to update the Microsoft.NETCore.App NuGet package as it only contains build references needed to build your application.
For self-contained applications, you can also set the <RuntimeFrameworkVersion> property inside the csproj file, but starting with the .NET Core SDK 2.1.300, you no longer need to as it will know about the latest versions.
As Martin points out above, the SDK and .Net Core Runtime are separate entities.
I went to https://www.microsoft.com/net/download/windows and downloaded the latest SDK (2.1) and installed it on my local machine. You'll need to close any open VS instances to complete the SDK installation.
Open your project's csproj file and update netcoreapp2.0 to netcoreapp2.1 and while you're at it you can update the "Microsoft.AspNetCore.All" to version 2.1. This will save you from having to update the nuGet package.
Worked for me. Best of luck.

Where do I find system.web.Http in .NET CORE 2.0 project

i need use System.Web.Http in my project.
I found that Microsoft.AspNet.WebApi.Core package has it, but in NET core project I have error:
Package 'Microsoft.AspNet.WebApi.Core 5.2.4' was restored using '.NETFramework,Version=v4.6.1' instead of the project target framework '.NETCoreApp,Version=v2.0'. This package may not be fully compatible with your project.
Can you help?

Package was restored using .NetFramework instead of project target framework

I created a new project with the DevExtreme ASP.Net Core Application template.
Then I changed the framework from .Net Core 1 to .Net Core 2.0
However when I try to build I get the following error.
Warning NU1701 Package 'System.Linq.Queryable 4.0.0' was restored using
'.NETFramework,Version=v4.6.1' instead of the project target framework
'.NETCoreApp,Version=v2.0'. . This package may not be fully compatible with your project.
This problem is similar to This question about Nu1701 However the package in question is DevExtreme.AspNet.Core The name of the package indicates that it is meant to work with Core.
Upgrade to the DevExtreme 17.2.2 Beta and use the DevExtreme 17.2 ASP.Net Core Application (.NET Core) template