Hello All,
I have an .Net Core console application. Can I use .NET framework DLL in .NET core?
Please help me on this
Hello All,
I have an .Net Core console application. Can I use .NET framework DLL in .NET core?
Please help me on this
I tried now.it is working. I have created some sample .Net framework dll and added into .Net Core project.
You should consider taking the .NET Framework code and migrating to .NET Core. Benefits include faster execution of code when moving to .NET Core along with having the ability to use new features in C#8 and C#9.
The most challenging part of going to .NET Core is finding certain references such as in .NET Framework, in a class project if a reference for System.Windows.Forms was needed it's easy to do while in .NET Core one needs to find the reference by browsing to
C:\Program Files\dotnet\packs\Microsoft.WindowsDesktop.App.Ref\5.0.0\ref\net5.0
Then selecting System.Windows.Forms.dll
Or add commonly used references to the Object browser which also allows you to add a reference to the current project with a single click.

Cleaner code can be written e.g.
public static void ConventionalExample()
{
using (var cn = new SqlConnection(ConnectionString))
{
cn.Open();
}
}
public static void CoreExample()
{
using var cn = new SqlConnection(ConnectionString);
cn.Open();
}
In closing, best to use the older code as a bridge which gives time to write the .NET Core class project.
9 people are following this question.
How to run .Net Core 3.1 Console application in background in Linux
How to check avilable free disk space drive on linux using C#.Net Core
How to implement NCryptSignHash and NCryptVerifySignature in C#?
How to solve Access to the path is denied Error in C#.NET Core application
How to create service application in Linux using C#.Net Core 3.1?