Closed
Description
Hi, I'm trying to use this library with AOT (PublishAot = true) in .NET 8, but got the following warnings on publish (CommandLineParser 2.9.1):
Generating native code
CommandLine.dll : warning IL2104: Assembly 'CommandLine' produced trim warnings. For more
information see https://aka.ms/dotnet-illink/libraries
CommandLine.dll : warning IL3053: Assembly 'CommandLine' produced AOT analysis warnings.
And when running I see:
Unhandled Exception: System.InvalidOperationException: Type Options appears to be immutable, but no constructor found to accept values.
Type options:
public class Options
{
private readonly bool verbose;
public Options(bool verbose)
{
this.verbose = verbose;
}
[Option]
public bool Verbose { get { return verbose; } }
}
Question: Is publishing with AOT supported?
Metadata
Metadata
Assignees
Labels
No labels