Skip to content

Mark library as AOT-compatible#77

Merged
MartinKuschnik merged 4 commits intoMartinKuschnik:masterfrom
ocoanet:master
Apr 3, 2026
Merged

Mark library as AOT-compatible#77
MartinKuschnik merged 4 commits intoMartinKuschnik:masterfrom
ocoanet:master

Conversation

@ocoanet
Copy link
Copy Markdown
Contributor

@ocoanet ocoanet commented Apr 3, 2026

WmiLight does not currently declare the IsAotCompatible=true MSBuild property. As a result, when it is referenced by a project with VerifyReferenceAotCompatibility=true, the following warning is generated:

warning IL3058: Referenced assembly 'WmiLight' is not built with `true` and may not be compatible with AOT.

This PR sets IsAotCompatible=true, which removes the warning.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates project build metadata to declare WmiLight as AOT-compatible (for net8.0+) and enables AOT reference compatibility verification to eliminate IL3058 warnings when consumed by AOT-verifying projects.

Changes:

  • Set IsAotCompatible=true for WmiLight when targeting net8.0+.
  • Enable VerifyReferenceAotCompatibility=true for WmiLight (net8.0+) and for the NetCore test app.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
WmiLight/WmiLight.csproj Marks the library AOT-compatible for net8.0+ and turns on AOT reference verification during library builds.
WmiLight.TestApp-NetCore/WmiLight.TestApp-NetCore.csproj Enables AOT reference verification for the AOT-publishing test app to validate referenced assemblies.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Simplified the project file to enable IsAotCompatible, VerifyReferenceAotCompatibility, and IsTrimmable only for net8.0 or later.
GitHub secrets are not available for pull requests from forks.
This change introduces a SIGN_ASSEMBLY environment variable that
disables assembly signing for PRs, allowing external contributors
to successfully build the project without access to the private key.
@MartinKuschnik MartinKuschnik merged commit d145d36 into MartinKuschnik:master Apr 3, 2026
1 check passed
@MartinKuschnik
Copy link
Copy Markdown
Owner

Thank you @ocoanet for this contribution! 🎉

Your changes will be included in version 7.1.1, which will be available soon.

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

Successfully merging this pull request may close these issues.

3 participants