NetSparkleUpdater / NetSparkle

NetSparkle is a C# cross-platform software update framework for .NET developers compatible with .NET 4.6.2/.NET 6+, WinForms, WPF, and Avalonia; uses Ed25519 or DSA signatures! View basic usage here in the README or visit our website for code docs.
https://netsparkleupdater.github.io/NetSparkle/
MIT License
589 stars 81 forks source link

Hi, does this updater support AOT with avalonia 11? #537

Closed IronEaterBeast closed 7 months ago

IronEaterBeast commented 7 months ago

I couldn't find the relevant information.

Deadpikle commented 7 months ago

Hi @IronEaterBeast, great question and don't worry, you didn't miss the info somewhere :smile:. Answer: Don't know for sure myself as I've never tried, but probably not...? I think we'd need to use Avalonia's compiled bindings and make the System.Text.Json stuff use the appropriate source generator. And check if the other external libraries were AOT compatible.

PR's and enhancements from anyone in this regard would be great!

IronEaterBeast commented 7 months ago

Hi @IronEaterBeast, great question and don't worry, you didn't miss the info somewhere 😄. Answer: Don't know for sure myself as I've never tried, but probably not...? I think we'd need to use Avalonia's compiled bindings and make the stuff use the appropriate source generator. And check if the other external libraries were AOT compatible.System.Text.Json

PR's and enhancements from anyone in this regard would be great!

Hi @IronEaterBeast, great question and don't worry, you didn't miss the info somewhere 😄. Answer: Don't know for sure myself as I've never tried, but probably not...? I think we'd need to use Avalonia's compiled bindings and make the stuff use the appropriate source generator. And check if the other external libraries were AOT compatible.System.Text.Json

PR's and enhancements from anyone in this regard would be great!

OK, got it , thank you.

Deadpikle commented 4 days ago

@IronEaterBeast Hey by the way, the latest preview version of NetSparkle supports trimming! Enjoy. :-)

IronEaterBeast commented 3 days ago

So, does the latest preview version support AOT? Because AOT is dependent on trimming.

Deadpikle commented 3 days ago

I did a test with NetSparkle.Tests.Trimming, and I was able to create an AOT app.

The new AsmResolverAccessor has an AOT single file warning where you may get unexpected behavior with its call to Assembly.GetEntryAssembly().Location, but to avoid that, just create your own AsmResolverAccessor and make sure to pass it the path of your assembly, and/or create your own AssemblyAccessor that does what you need.