Surfaced by IsAotCompatible=true on Weasel.Core (landed in Weasel 9.0 foundation):
warning IL3050: Using member 'Spectre.Console.AnsiConsole.WriteException(Exception, ExceptionFormats)' which has 'RequiresDynamicCodeAttribute' can break functionality when AOT compiling. ExceptionFormatter is currently not supported for AOT.
Location: src/Weasel.Core/CommandLine/AssertCommand.cs:34
This is in a CLI command — dev-time tool, not production hot path. Per the JasperFx 2.0 cold-start/AOT pillar pattern, the fix is to annotate the consuming method (or class) with [RequiresDynamicCode] so the warning propagates to AOT-publishing consumers as a precise diagnostic rather than getting silently swallowed.
Tracked under pillar JasperFx/jasperfx#213.
Surfaced by
IsAotCompatible=trueon Weasel.Core (landed in Weasel 9.0 foundation):Location:
src/Weasel.Core/CommandLine/AssertCommand.cs:34This is in a CLI command — dev-time tool, not production hot path. Per the JasperFx 2.0 cold-start/AOT pillar pattern, the fix is to annotate the consuming method (or class) with
[RequiresDynamicCode]so the warning propagates to AOT-publishing consumers as a precise diagnostic rather than getting silently swallowed.Tracked under pillar JasperFx/jasperfx#213.