7

Is it possible to use a nuget package written in the .net framework inside a .net core project?

As I've tried to use inject one of the classes from the .net framework project into the .net core project but it stops any requests getting through to the controller

1 Answer 1

11

Well the answer is not so straight forward. I will try to explain here-

While sharing libraries between .net versions, keep it in mind that the .Net Standard is based on a subset of the overall APIs currently available in the .Net Framework. Many of the APIs that you may have grown accustomed to using in the .Net Framework will not be part of the .Net Standard, particularly once you get into those areas that have been most heavily refactored by .Net Core (e.g. ASP.Net).

You can use this extension for visual studio to check the compatibility. I have worked on projects where I have ported .NET web API applications into .NET-core web API applications. Some of the useful packages you'll find in nuget available for .NET core. But some you won't find. Also most of the packages by Microsoft are also re-written so, expect some change over the old syntax and member/method names. I suggest check-out the compatibility & dependencies of the packages you are downloading from nuget.

You can go through this article for more clear understanding.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.