Skip to content

Make the library trim and Native AOT compatible - #62

Open
michaelthyregod wants to merge 1 commit into
AngleSharp:develfrom
michaelthyregod:feature/aot
Open

michaelthyregod wants to merge 1 commit into
AngleSharp:develfrom
michaelthyregod:feature/aot

Conversation

@michaelthyregod

Copy link
Copy Markdown
Contributor

Marks the net8.0 and net10.0 targets IsAotCompatible, as in AngleSharp, AngleSharp.Xml and AngleSharp.Css, so the trim and AOT analyzers run on every build. It uses the same KnownILLinkPack override as those repositories.

  • Change: csproj only, plus a line in AGENTS.md; no code changes were needed.
  • Behaviour: none for existing users; netstandard2.0 and the .NET Framework targets are unaffected.

Verified: all targets build without trim or AOT warnings, and a console app published with PublishAot (HTTP requester, cookies, HTTP cache, data: URLs, navigator) compiles without warnings and runs correctly.

🤖 Generated with Claude Code

- Mark the net8.0 and net10.0 targets IsAotCompatible, so the trim and AOT
  analyzers run on every build, with the same KnownILLinkPack override as
  AngleSharp, AngleSharp.Xml and AngleSharp.Css
- Update AGENTS.md and CHANGELOG.md

The library uses no reflection, so no code changes were needed: all targets
build without trim or AOT warnings, and a console app published with
PublishAot (HTTP requester, cookies, HTTP cache, data: requester, navigator)
compiles without warnings and runs correctly.
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.

1 participant