Migrating to .NET Core: NuGet Package Dependencies

There are a few road blocks from migrating to .NET Core.  One roadblock is .NET Framework API’s that are not included in NETStandard2.0.  Another, is NuGet Package dependencies.

I’ll cover the API surface in another post, but for this post I want to show you a couple quick ways you can check if your NuGet package dependencies are compatible with .NET Core.

Checking NuGet.org

If you head over to NuGet.org and search for the package you depend on, there you can click to expand the Dependencies heading which will list all the targets.  Here’s an example of the MediatR package.

You can see which Platforms and versions of .NET Standard it supports.  And for each target ,which dependencies it has under that target.

I Can has .NET Core

The folks at Octopus Deploy released icanhasdot.net.  Here’s what how it works:

Upload your project’s packages.config, project.json, paket.dependencies and *.csproj files for analysis and we will build a visualization of the packages and whether .NET Standard versions are available on nuget.org

Give it try to see which NuGet packages you consume that are targeting .NET Standard.

Another interesting feature on the site is the Statistics page which shows Unsported and Supported packages that have been scanned.  I really am amazed how many library authors picked up on and supported .NET Standard.

Dependency Roadblocks

If find yourself blocked from migrating to .NET Core because of dependencies on certain NuGet packages, I’d love to hear about which ones? Also, if you were blocked but found an alternative package, let me know in the comments section or on Twitter.

Enjoy this post? Subscribe!

Subscribe to our weekly Newsletter and stay tuned.