Skip to content
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

Curious about AOT compilation #65

Closed
jcyuan opened this issue Apr 23, 2024 · 2 comments
Closed

Curious about AOT compilation #65

jcyuan opened this issue Apr 23, 2024 · 2 comments

Comments

@jcyuan
Copy link

jcyuan commented Apr 23, 2024

Hi sir, sorry this is not a bug, just curious about this lib even works fine with AOT mode, because System.Management is obviously not compatible with AOT mode: dotnet/runtime#61960
so what magic did you use, sir?
and thanks~

@Jinjinov
Copy link
Owner

I wrote this library on Jul 12, 2020 but AOT became available with .NET 7 on Nov 8, 2022

I don't know why it works with AOT :)

Perhaps it works because my code never call the methods mentioned in the link you provided:

ManagementClass managementClass = new ManagementClass("Win32_BaseBoard");
var instances = managementClass.GetInstances();
foreach (var obj in instances)
{
    //...
}

@jcyuan
Copy link
Author

jcyuan commented Apr 24, 2024

I wrote this library on Jul 12, 2020 but AOT became available with .NET 7 on Nov 8, 2022

I don't know why it works with AOT :)

Perhaps it works because my code never call the methods mentioned in the link you provided:

ManagementClass managementClass = new ManagementClass("Win32_BaseBoard");
var instances = managementClass.GetInstances();
foreach (var obj in instances)
{
    //...
}

thanks man~ :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants