Use . NET Framework DLL in . NET Core

Asked

Viewed 431 times

3

A DLL in C# compiled in . NET 4.6 can be imported by a program in . NET Core on Linux?

  • Did the answer solve your question? Do you think you can accept it? See [tour] if you don’t know how you do it. This would help a lot to indicate that the solution was useful to you. You can also vote on any question or answer you find useful on the entire site

1 answer

3

In principle, yes. The format of the CLR, or more commonly called . NET (although technically an error), is universal and works in any environment prepared for its use. this includes taking something from . NET Framework and using in .NET Core. There would only be some difference to the .NET Native which has a native format.

This does not mean that everything will work. What is part of the .NET Standard will work, since what is specific to an implementation will not work. You cannot use things specific to Windows. Even . NET Core 3.0 supporting Winforms and WPF does not mean that it will run on Linux, unless someone ported them to this operating system, which is not simple, especially in WPF.

So the format of the executable is no problem, but not all code is universal.

See more in What are the differences of ". NET"?.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.