NetSparkleUpdater/NetSparkle

Hi, does this updater support AOT with avalonia 11?

IronEaterBeast opened this issue ยท 5 comments

I couldn't find the relevant information.

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 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!

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.

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

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

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.