3F / DllExport

.NET DllExport with .NET Core support (aka 3F/DllExport aka DllExport.bat)
MIT License
960 stars 133 forks source link

Incompatible with NET5.0 #195

Closed lmnx90 closed 2 years ago

lmnx90 commented 2 years ago

I have a C# library, and it's target framework is .NET 5.0 . Also, with VS 16.11.5.

The problem I met with is I can't call the public static method which is tagged by "[DllExport]" from another C# application. It will throw a trace "cant not found method xxxx.xxx.function". If I calling the lib from native C++ , it comes to crashed.

And everything is ok when I change the lib's target frame from .NET5.0 to Framework 4.6.1. So is there any incompatible thing happened to .NET5.0?

I also tried the simplest "int _add(int, int)" example, unfortunately the result is the same as above case.

3F commented 2 years ago

Hello,

I can't call the public static method which is tagged by "[DllExport]" from another C# application.

Duplicate of #94

If I calling the lib from native C++ , it comes to crashed.

Depends on the specific case but this is duplicate of #132 and/or #193

Please read here https://github.com/3F/DllExport/issues/193#issuecomment-899030110