microsoft / krabsetw

KrabsETW provides a modern C++ wrapper and a .NET wrapper around the low-level ETW trace consumption functions.
Other
581 stars 149 forks source link

System.TypeInitializationException under .NET Framework 4.7.2 and 4.8 #190

Open securityfreax opened 2 years ago

securityfreax commented 2 years ago

Hey all,

I am running into the following exception, with Microsoft Visual Studio Professional 2019, Version 16.11.3. I have installed the managed NuGet Package “Microsoft.O365.Security.Native.ETW, Version 4.2.2”

The App compiles with no errors, but when I run the app, it raises a “System.TypeInitializationException” Exception immediately when loading the Class, where “Microsoft.O365.Security.Native.ETW” is in the using clause.

Here is the translated Exception Message (from German):

System.IO.FileLoadException: The file or assembly "Microsoft.O365.Security.Native.ETW, Version=1.0.7951.28336, Culture=neutral, PublicKeyToken=31bf3856ad364e35" or a dependency on it was not found. An attempt is made to load a non-verifiable executable with fixups (IAT with more than 2 sections or a TLS section).

Is this a known issue? Is there any fix?

Thank you very much in advance.