Skip to content

Commit c8e796f

Browse files
ANcpLuaclaude
andcommitted
feat(aot): add VerifyReferenceAotCompatibility option
When EnableAotTesting=true, consumers can opt-in to verify all referenced assemblies are marked as AOT-compatible. This triggers IL3058 warnings for dependencies without IsAotCompatible metadata. Usage: <PropertyGroup> <EnableAotTesting>true</EnableAotTesting> <VerifyReferenceAotCompatibility>true</VerifyReferenceAotCompatibility> </PropertyGroup> Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 9852c54 commit c8e796f

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

src/Testing/AotTesting/AotTesting.props

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,17 @@
2222
<DefaultAotTestTimeout Condition="'$(DefaultAotTestTimeout)' == ''">300</DefaultAotTestTimeout>
2323
</PropertyGroup>
2424

25+
<!--
26+
AOT Compatibility Verification
27+
28+
When enabled, verifies that all referenced assemblies are marked as AOT-compatible.
29+
This triggers IL3058 warnings for dependencies without IsAotCompatible metadata.
30+
Opt-in to catch unmarked but potentially incompatible dependencies early.
31+
-->
32+
<PropertyGroup Condition="'$(EnableAotTesting)' == 'true'">
33+
<VerifyReferenceAotCompatibility Condition="'$(VerifyReferenceAotCompatibility)' == ''">false</VerifyReferenceAotCompatibility>
34+
</PropertyGroup>
35+
2536
<!--
2637
AOT Testing Package References
2738

0 commit comments

Comments
 (0)