.NET 4.5
is a minimal requirement for 5.0 version and above of Web API.
Cross Domain Web API: Install-Package Microsoft.AspNet.WebApi.Cors Not Working
-
08-07-2023 - |
Question
As Cross Domain call to Web API project not working from ASP.NET Web Forms client in IE (Working in other browsers). I guess I need to install following Nugget pakage.
Install-Package Microsoft.AspNet.WebApi.Cors
But when I try to install it I got following error.
Install failed. Rolling back...
Install-Package : Could not install package 'Microsoft.AspNet.WebApi.Client 5.1.2'. You are trying to install
this package into a project that targets '.NETFramework,Version=v4.0', but the package does not contain any as
sembly references that are compatible with that framework. For more information, contact the package author.
At line:1 char:16
+ Install-Package <<<< Microsoft.AspNet.WebApi.Cors -pre -project WebAPI
+ CategoryInfo : NotSpecified: (:) [Install-Package], InvalidOperationException
+ FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PowerShell.Commands.InstallPackageCommand
I am trying to install in: Visual Studio 2010 which targets .NET 4.0.
Does this package is not supported in .NET 4.0 ?
Best Regards Hardeep
La solution
Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow