0
votes

I have made my own NuGet package which is target framework is .NET STandard 2.0

These are the dependencies for my package:

<dependencies>
        <group targetFramework=".NETStandard2.0">
            <dependency id="Apache.NMS.ActiveMQ.NetStd" version="1.7.2.4114" />
            <dependency id="Microsoft.Extensions.Logging" version="2.1.1" />
            <dependency id="Newtonsoft.Json" version="11.0.2" />            
        </group>
    </dependencies>

When i try to install my package in a .Net Core 2.1 Web API, i get these errors:

Severity Code Description Project File Line Suppression State Warning NU1701 Package 'Apache.NMS 1.7.1' 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.

Severity Code Description Project File Line Suppression State Warning NU1701 Package 'Apache.NMS.ActiveMQ 1.7.2' 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.

1
I created a basic nuget package with a .net std 2.0 class library with apache.mns.activemq.netstd 1.7.2.4114 in it and then created a .net core 2.1 web api project and added the package to it without any warnings or errors..... It should work. I can't really diagnose more with what you have shown. - Kevin LaBranche

1 Answers

0
votes

Install the .NET Core version:

Apache.NMS.ActiveMQ.NetCore

The package you referenced doesn't target .NET Standard and thus you get the warning.