1
votes

I have a .net472 framework library which I want to call from a netcoreapp2.1 api. Because I use the library in many projects I made my own nuget feed for it. The feed works when I use it to install packages into my other .net472 applications.

However when I try to install it into my .netcoreapp2.1 api I get an error When I try to install using Nuget I get

NU1202 Package SBD.Common 2.0.0-CI-20190830-212056 is not compatible with netcoreapp2.1 (.NETCoreApp,Version=v2.1). Package SBD.Common 2.0.0-CI-20190830-212056 supports: net472 (.NETFramework,Version=v4.7.2) ApiForMe C:\dev\MyApi\MyApi.csproj

I tried clearing the Nuget Cache as show here but it did not help.

My .net472 class library has a dependency on Entity Framework 6.2

1
You might switch to .NET Standard, but a common practice is to use multi targeting, blog.lextudio.com/…Lex Li
@KirstenGreed Maybe that's your problem. Just looking at nuget.org it doesn't look like EntityFramework 6.2 supports netcoreapp2.1. At least it is not marked as supporting netstandard2.0. You might want to try rebuilding with the latest preview version but this is a wild guess.GlennSills

1 Answers

0
votes

install other version .net core sdk .Some package use low version .net core sdk.You can check with version with folder:C:\Program Files\dotnet\shared\Microsoft.NETCore.App