-
-
Notifications
You must be signed in to change notification settings - Fork 532
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for .NET NativeAOT #1155
Comments
Not sure if this issue is related to trimming, because I tried to remove
After running it I got the following error:
Seems to be the same with this |
Create a xml file: <?xml version="1.0" encoding="utf-8" ?>
<linker>
<assembly fullname="Spectre.Console" preserve="all" />
<assembly fullname="Spectre.Console.Cli" preserve="all" />
<assembly fullname="YourAssemblyName" preserve="all" />
</linker> Add this section to csproj file: <ItemGroup>
<TrimmerRootDescriptor Include="path/to/the/xml" />
</ItemGroup> Then try again. |
Thanks, that solved the problem. |
Hello there, I'm here for the same reason - publishing a trimmed app. I see the workaround is there, but the workaround is not to trim the library, so my app will carry its whole weight and it's not the goal of publishing trimmed apps :) So if you would ever like to make the library "trimmable", I'd be grateful :) |
I'm trying to build a command line tool with
Spectre.Console.Cli
and .NET NativeAOT enabled in .NET 7 (by<PublishAot>true</PublishAot>
in csproj). But when I publish this project I get the following warnings:After I run the published exe I get the following error:
The minimal reproducable program is like this:
I think it will be amazing if this library could support NativeAOT, for faster startup speed, smaller packaged size, no runtime needed, etc.
The text was updated successfully, but these errors were encountered: