3F / DllExport

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

SEHException on .NET Core 3.1 #134

Closed esso23 closed 4 years ago

esso23 commented 4 years ago

Hello again, I have another problem, this one seems to be pretty serious (unless I'm doing something wrong). Basically I'm unable to do anything with DllExport in .NET Core 3.1/.NET Standard 2.1 environmnent due to SEHException which appears everytime I call exported method (when called from native code it also crashes without any information about the crash).

How to reproduce: Create .NET Core 3.1 DLL and export one void parameterless method. Import it in .NET Core 3.1 console app and call it. Application will throw an exception:

System.Runtime.InteropServices.SEHException: 'External component has thrown an exception.'

VS Solution: DllExport_SEH.zip Just run ImportApp to reproduce.

Used configuration: Library: .NET Core 3.1.100 x64 Console App: .NET Core 3.1.100 x64

3F commented 4 years ago

dup #132 Please follow my instructions there.