Reputation: 79
I have provide support for ApiController with the Microsoft.AspNetCore.Mvc.WebApiCompatShim(1.0.3) package in .Net core 1.0.
Currently, I upgrading the project to .Net core 2.0 from 1.0. At the same time, I upgraded the Microsoft.AspNetCore.Mvc.WebApiCompatShim package to 2.0.0 version.
The following changes are done in .csproj when migrating .Net core 2.0 from 1.0.
But, I am getting the following warnings for Microsoft.AspNetCore.Mvc.WebApiCompatShim(2.0.0) when restoring.
Package 'Microsoft.AspNet.WebApi.Client 5.2.2' 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.
How to solve this.
Upvotes: 0
Views: 639
Reputation: 2846
Displaying this warning message, when restoring "compatibility" nuget packages is by design. When you get such a warning when restoring any compat shim, that would mean that your compat shim is working properly. You can suppress this warning by going to properties of that package and setting "NoWarn" property.
For a full discussion on this type of issue by Immo Landwerth please have a look here
Hope this helps.
Upvotes: 1