How to know will nuget package work on .NET Core?

2019-04-06 15:12发布

问题:

I would expect some kind of filter to exists on website or in console.

回答1:

This isn't easy right now, unfortunately. There's an issue open on the NuGet Github about adding a filter to the website.

Right now, the best way to tell if a package will work with .NET Core is by examining the frameworks it supports in the Dependencies section.

If .NETStandard is listed, the package supports .NET Core via the .NET Platform Standard:

If a package doesn't list .NETStandard, or simply has an empty Dependencies section, it does not support .NET Core:



回答2:

Setup a .NET Core project in the version you want. I keep 1.1 and 2.0 projects around for futzing with this. Then try and add the nuget to the project.

For instance, ASPOSE will NOT add to a 1.1 project, but will add to a 2.0 project.

Easiest route in the short term until they fix this somehow.

Obviously this is no guarantee it still works but gives you a good idea if its api compat.