Fix IL3050 NativeAOT warnings in WinUI and GNOME Program.cs#115
Fix IL3050 NativeAOT warnings in WinUI and GNOME Program.cs#115
Conversation
… to Main methods Co-authored-by: nlogozzo <17648453+nlogozzo@users.noreply.github.com>
|
@copilot Does this prevent NativeAOT benefits? |
No, this does not prevent NativeAOT benefits. Here's why:
The NativeAOT compilation itself is unaffected:
The only alternative to silence these warnings without propagation would be to suppress them with |
* feat: Update deps * Fix IL3050 NativeAOT warnings in WinUI and GNOME Program.cs (#115) * Initial plan * Fix IL3050 NativeAOT warnings by adding RequiresDynamicCode attribute to Main methods Co-authored-by: nlogozzo <17648453+nlogozzo@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: nlogozzo <17648453+nlogozzo@users.noreply.github.com> * fix: Sources * fix: NativeAOT - replace reflection-based XAML bindings in SettingsPage (#117) * Initial plan * fix: replace DisplayMemberPath with compiled x:Bind ItemTemplate for NativeAOT compatibility Co-authored-by: nlogozzo <17648453+nlogozzo@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: nlogozzo <17648453+nlogozzo@users.noreply.github.com> * feat: Update license * fix: Missing sources * feat: Bindable item * feat: Update deps --------- Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com> Co-authored-by: nlogozzo <17648453+nlogozzo@users.noreply.github.com>
Nickvision.Desktoprecently annotatedConfigureWinUI<T>()andConfigureAdw<T>()with[RequiresDynamicCode]. Calling these from unannotatedMainmethods produces IL3050 warnings under NativeAOT.Changes
Nickvision.Application.WinUI/Program.cs— Added[RequiresDynamicCode]toMainto propagate the attribute fromConfigureWinUI<T>()Nickvision.Application.GNOME/Program.cs— Added[RequiresDynamicCode]toMainto propagate the attribute fromConfigureAdw<T>()Warning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
crl.godaddy.com/usr/bin/dotnet dotnet restore --no-dependencies /tmp/codeql-scratch-297de09d6e55df2d/dbs/csharp/working/7F0AD5B89EC078FE77CFD6BDA2F52E08/missingpackages_workingdir --packages /tmp/codeql-scratch-297de09d6e55df2d/dbs/csharp/working/missingpackages /p:DisableImplicitNuGetFallbackFolder=true --verbosity normal --configfile /tmp/codeql-scratch-297de09d6e55df2d/dbs/csharp/working/nugetconfig/nuget.config --force(dns block)ocsp.godaddy.com/usr/bin/dotnet dotnet restore --no-dependencies /tmp/codeql-scratch-297de09d6e55df2d/dbs/csharp/working/7F0AD5B89EC078FE77CFD6BDA2F52E08/missingpackages_workingdir --packages /tmp/codeql-scratch-297de09d6e55df2d/dbs/csharp/working/missingpackages /p:DisableImplicitNuGetFallbackFolder=true --verbosity normal --configfile /tmp/codeql-scratch-297de09d6e55df2d/dbs/csharp/working/nugetconfig/nuget.config --force(dns block)If you need me to access, download, or install something from one of these locations, you can either:
💬 Send tasks to Copilot coding agent from Slack and Teams to turn conversations into code. Copilot posts an update in your thread when it's finished.