We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The .NET library is not functioning when compiled with NativeAot, resulting in an exception being thrown.
NativeAot
PublishAot
An exception is thrown with the following message:
A type initializer threw an exception. To determine which type, inspect the InnerException's StackTrace property.
The issue stems from the static constructor of Fsp.Interop.Api. To resolve this, perform the following changes:
Fsp.Interop.Api
Init
GetEntryPoint
private static T GetEntryPoint<T>(IntPtr Module) { return Marshal.GetDelegateForFunctionPointer<T>(GetEntryPointPtr(Module, typeof(T).Name)); }
I hope this will help people that using NativeAOT.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Bug Report
The .NET library is not functioning when compiled with
NativeAot
, resulting in an exception being thrown.Steps to Reproduce
PublishAot
option.Observed behavior
An exception is thrown with the following message:
Environment
Temporary Solution
The issue stems from the static constructor of
Fsp.Interop.Api
. To resolve this, perform the following changes:Init
method and manually call it before executing your code.GetEntryPoint
method in the class as follows:I hope this will help people that using NativeAOT.
The text was updated successfully, but these errors were encountered: