I am trying to reference a nuget package which is clearly .NetStandard2.0
. We own the source code for this package and written it to target .netstandard. We do have a CI pipeline so that when we push this code, it builds and releases the nuget package. When I try to reference the resulting nuget package into my current .netCore application, i get following error:
was restored using '.NETFramework,Version=v4.6.1' instead of the project target framework '.NETCoreApp,Version=v2.1'. This package may not be fully compatible with your project.
That does not make any sense to me. So far I have tried following debugging steps:
- Referenced the source code directly as a project reference to my project. Which did work all fine.
- Analyzing resulting nuget package in
dotpeek
to make sure that it in fact is a .netstandard package and it is.
Not sure what makes it think that it was targeting at any point. below is how my .csproj configuration looks like
<TargetFramework>netstandard2.0</TargetFramework>
Not sure if any other config block matters here but let me know if you need more info on this. Any ideas?