-
-
Notifications
You must be signed in to change notification settings - Fork 31
New issue
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
Failed to compile with NativeAOT .NET 7.0 #48
Comments
SampleWindowsForms was a bit outdated. I did update sample, but mostly you need just what's in the README.md. Couple questions
|
Yep.
I was using directly winforms and the UserControl, so pretty basic. But don't worry, that was for testing. Probably not gonna use winforms anyway. I will close it for now. Thanks! |
That's pretty strange, since I did try that on different apps, and never seen this issue. |
Also what OS you are try to compile? I assume that's windows? |
Yeah, Windows.
My setup is a bit unusual, as it was to test this within a NativeAOT library (and not an exe), though I would not think that would matter, the error is coming from ILC, like it's not even able to locate the assembly, dunno, but weird... anyway, I don't want to bother you with this! 😉 |
Take a look at this sample https://github.com/kant2002/WinFormsComInterop/tree/main/samples/HostedWindowsForms. I think you was missing |
Hey,
I was trying to use it on a .NET 7 + NativeAOT and dotnet publish generates the following warning:
And it crashes at runtime indeed.
I had also to remove the initialization of
WinFormsComInterop
(Package0.3.2
) as I saw it hereAny clue?
The text was updated successfully, but these errors were encountered: