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
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With