Skip to content

NativeAOT support#6

Merged
nlogozzo merged 5 commits intomainfrom
fix/aot
Mar 20, 2026
Merged

NativeAOT support#6
nlogozzo merged 5 commits intomainfrom
fix/aot

Conversation

@nlogozzo
Copy link
Member

No description provided.

@nlogozzo
Copy link
Member Author

@copilot Can you fix the IL2091 warning and CsWinRT1028 warnings from below:

Build started at 11:19 PM...
1>------ Build started: Project: Nickvision.Desktop.GNOME, Configuration: Debug Any CPU ------
2>------ Build started: Project: Nickvision.Desktop.WinUI, Configuration: Debug Any CPU ------
2>C:\Program Files\Microsoft Visual Studio\18\Community\MSBuild\Current\Bin\arm64\Microsoft.Common.CurrentVersion.targets(2451,5): warning MSB3277: Found conflicts between different versions of "System.Collections.Immutable" that could not be resolved.
2>C:\Program Files\Microsoft Visual Studio\18\Community\MSBuild\Current\Bin\arm64\Microsoft.Common.CurrentVersion.targets(2451,5): warning MSB3277: There was a conflict between "System.Collections.Immutable, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" and "System.Collections.Immutable, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a".
2>C:\Program Files\Microsoft Visual Studio\18\Community\MSBuild\Current\Bin\arm64\Microsoft.Common.CurrentVersion.targets(2451,5): warning MSB3277:     "System.Collections.Immutable, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" was chosen because it was primary and "System.Collections.Immutable, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" was not.
2>C:\Program Files\Microsoft Visual Studio\18\Community\MSBuild\Current\Bin\arm64\Microsoft.Common.CurrentVersion.targets(2451,5): warning MSB3277:     References which depend on "System.Collections.Immutable, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" [C:\Users\nlogozzo\.nuget\packages\microsoft.netcore.app.ref\9.0.14\ref\net9.0\System.Collections.Immutable.dll].
2>C:\Program Files\Microsoft Visual Studio\18\Community\MSBuild\Current\Bin\arm64\Microsoft.Common.CurrentVersion.targets(2451,5): warning MSB3277:         C:\Users\nlogozzo\.nuget\packages\microsoft.netcore.app.ref\9.0.14\ref\net9.0\System.Collections.Immutable.dll
2>C:\Program Files\Microsoft Visual Studio\18\Community\MSBuild\Current\Bin\arm64\Microsoft.Common.CurrentVersion.targets(2451,5): warning MSB3277:           Project file item includes which caused reference "C:\Users\nlogozzo\.nuget\packages\microsoft.netcore.app.ref\9.0.14\ref\net9.0\System.Collections.Immutable.dll".
2>C:\Program Files\Microsoft Visual Studio\18\Community\MSBuild\Current\Bin\arm64\Microsoft.Common.CurrentVersion.targets(2451,5): warning MSB3277:             C:\Users\nlogozzo\.nuget\packages\microsoft.netcore.app.ref\9.0.14\ref/net9.0/System.Collections.Immutable.dll
2>C:\Program Files\Microsoft Visual Studio\18\Community\MSBuild\Current\Bin\arm64\Microsoft.Common.CurrentVersion.targets(2451,5): warning MSB3277:     References which depend on or have been unified to "System.Collections.Immutable, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" [].
2>C:\Program Files\Microsoft Visual Studio\18\Community\MSBuild\Current\Bin\arm64\Microsoft.Common.CurrentVersion.targets(2451,5): warning MSB3277:         C:\Users\nlogozzo\.nuget\packages\markdig\1.1.1\lib\net8.0\Markdig.dll
2>C:\Program Files\Microsoft Visual Studio\18\Community\MSBuild\Current\Bin\arm64\Microsoft.Common.CurrentVersion.targets(2451,5): warning MSB3277:           Project file item includes which caused reference "C:\Users\nlogozzo\.nuget\packages\markdig\1.1.1\lib\net8.0\Markdig.dll".
2>C:\Program Files\Microsoft Visual Studio\18\Community\MSBuild\Current\Bin\arm64\Microsoft.Common.CurrentVersion.targets(2451,5): warning MSB3277:             C:\Users\nlogozzo\.nuget\packages\markdig\1.1.1\lib\net8.0\Markdig.dll
2>C:\Program Files\Microsoft Visual Studio\18\Community\MSBuild\Current\Bin\arm64\Microsoft.Common.CurrentVersion.targets(2451,5): warning MSB3277:             C:\Users\nlogozzo\.nuget\packages\nickvision.desktop\2026.3.4\lib\net9.0-windows10.0.19041\Nickvision.Desktop.dll
2>C:\Program Files\Microsoft Visual Studio\18\Community\MSBuild\Current\Bin\arm64\Microsoft.Common.CurrentVersion.targets(2451,5): warning MSB3277:         C:\Users\nlogozzo\.nuget\packages\system.drawing.common\10.0.5\lib\net9.0\System.Private.Windows.Core.dll
2>C:\Program Files\Microsoft Visual Studio\18\Community\MSBuild\Current\Bin\arm64\Microsoft.Common.CurrentVersion.targets(2451,5): warning MSB3277:           Project file item includes which caused reference "C:\Users\nlogozzo\.nuget\packages\system.drawing.common\10.0.5\lib\net9.0\System.Private.Windows.Core.dll".
2>C:\Program Files\Microsoft Visual Studio\18\Community\MSBuild\Current\Bin\arm64\Microsoft.Common.CurrentVersion.targets(2451,5): warning MSB3277:             C:\Users\nlogozzo\.nuget\packages\system.drawing.common\10.0.5\lib\net9.0\System.Private.Windows.Core.dll
2>C:\Program Files\Microsoft Visual Studio\18\Community\MSBuild\Current\Bin\arm64\Microsoft.Common.CurrentVersion.targets(2451,5): warning MSB3277:             C:\Users\nlogozzo\.nuget\packages\system.drawing.common\10.0.5\lib\net9.0\System.Drawing.Common.dll
2>C:\Program Files\Microsoft Visual Studio\18\Community\MSBuild\Current\Bin\arm64\Microsoft.Common.CurrentVersion.targets(2451,5): warning MSB3277:             C:\Users\nlogozzo\.nuget\packages\microsoft.toolkit.uwp.notifications\7.1.3\lib\net5.0-windows10.0.17763\Microsoft.Toolkit.Uwp.Notifications.dll
2>C:\Program Files\Microsoft Visual Studio\18\Community\MSBuild\Current\Bin\arm64\Microsoft.Common.CurrentVersion.targets(2451,5): warning MSB3277:             C:\Users\nlogozzo\.nuget\packages\nickvision.desktop\2026.3.4\lib\net9.0-windows10.0.19041\Nickvision.Desktop.dll
2>C:\Program Files\Microsoft Visual Studio\18\Community\MSBuild\Current\Bin\arm64\Microsoft.Common.CurrentVersion.targets(2451,5): warning MSB3277:             C:\Users\nlogozzo\.nuget\packages\system.drawing.common\10.0.5\lib\net9.0\System.Private.Windows.GdiPlus.dll
2>C:\Program Files\Microsoft Visual Studio\18\Community\MSBuild\Current\Bin\arm64\Microsoft.Common.CurrentVersion.targets(2451,5): warning MSB3277: Found conflicts between different versions of "System.Reflection.Metadata" that could not be resolved.
2>C:\Program Files\Microsoft Visual Studio\18\Community\MSBuild\Current\Bin\arm64\Microsoft.Common.CurrentVersion.targets(2451,5): warning MSB3277: There was a conflict between "System.Reflection.Metadata, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" and "System.Reflection.Metadata, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a".
2>C:\Program Files\Microsoft Visual Studio\18\Community\MSBuild\Current\Bin\arm64\Microsoft.Common.CurrentVersion.targets(2451,5): warning MSB3277:     "System.Reflection.Metadata, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" was chosen because it was primary and "System.Reflection.Metadata, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" was not.
2>C:\Program Files\Microsoft Visual Studio\18\Community\MSBuild\Current\Bin\arm64\Microsoft.Common.CurrentVersion.targets(2451,5): warning MSB3277:     References which depend on "System.Reflection.Metadata, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" [C:\Users\nlogozzo\.nuget\packages\microsoft.netcore.app.ref\9.0.14\ref\net9.0\System.Reflection.Metadata.dll].
2>C:\Program Files\Microsoft Visual Studio\18\Community\MSBuild\Current\Bin\arm64\Microsoft.Common.CurrentVersion.targets(2451,5): warning MSB3277:         C:\Users\nlogozzo\.nuget\packages\microsoft.netcore.app.ref\9.0.14\ref\net9.0\System.Reflection.Metadata.dll
2>C:\Program Files\Microsoft Visual Studio\18\Community\MSBuild\Current\Bin\arm64\Microsoft.Common.CurrentVersion.targets(2451,5): warning MSB3277:           Project file item includes which caused reference "C:\Users\nlogozzo\.nuget\packages\microsoft.netcore.app.ref\9.0.14\ref\net9.0\System.Reflection.Metadata.dll".
2>C:\Program Files\Microsoft Visual Studio\18\Community\MSBuild\Current\Bin\arm64\Microsoft.Common.CurrentVersion.targets(2451,5): warning MSB3277:             C:\Users\nlogozzo\.nuget\packages\microsoft.netcore.app.ref\9.0.14\ref/net9.0/System.Reflection.Metadata.dll
2>C:\Program Files\Microsoft Visual Studio\18\Community\MSBuild\Current\Bin\arm64\Microsoft.Common.CurrentVersion.targets(2451,5): warning MSB3277:     References which depend on or have been unified to "System.Reflection.Metadata, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" [].
2>C:\Program Files\Microsoft Visual Studio\18\Community\MSBuild\Current\Bin\arm64\Microsoft.Common.CurrentVersion.targets(2451,5): warning MSB3277:         C:\Users\nlogozzo\.nuget\packages\system.drawing.common\10.0.5\lib\net9.0\System.Private.Windows.Core.dll
2>C:\Program Files\Microsoft Visual Studio\18\Community\MSBuild\Current\Bin\arm64\Microsoft.Common.CurrentVersion.targets(2451,5): warning MSB3277:           Project file item includes which caused reference "C:\Users\nlogozzo\.nuget\packages\system.drawing.common\10.0.5\lib\net9.0\System.Private.Windows.Core.dll".
2>C:\Program Files\Microsoft Visual Studio\18\Community\MSBuild\Current\Bin\arm64\Microsoft.Common.CurrentVersion.targets(2451,5): warning MSB3277:             C:\Users\nlogozzo\.nuget\packages\system.drawing.common\10.0.5\lib\net9.0\System.Private.Windows.Core.dll
2>C:\Program Files\Microsoft Visual Studio\18\Community\MSBuild\Current\Bin\arm64\Microsoft.Common.CurrentVersion.targets(2451,5): warning MSB3277:             C:\Users\nlogozzo\.nuget\packages\system.drawing.common\10.0.5\lib\net9.0\System.Drawing.Common.dll
2>C:\Program Files\Microsoft Visual Studio\18\Community\MSBuild\Current\Bin\arm64\Microsoft.Common.CurrentVersion.targets(2451,5): warning MSB3277:             C:\Users\nlogozzo\.nuget\packages\microsoft.toolkit.uwp.notifications\7.1.3\lib\net5.0-windows10.0.17763\Microsoft.Toolkit.Uwp.Notifications.dll
2>C:\Program Files\Microsoft Visual Studio\18\Community\MSBuild\Current\Bin\arm64\Microsoft.Common.CurrentVersion.targets(2451,5): warning MSB3277:             C:\Users\nlogozzo\.nuget\packages\nickvision.desktop\2026.3.4\lib\net9.0-windows10.0.19041\Nickvision.Desktop.dll
2>C:\Program Files\Microsoft Visual Studio\18\Community\MSBuild\Current\Bin\arm64\Microsoft.Common.CurrentVersion.targets(2451,5): warning MSB3277:             C:\Users\nlogozzo\.nuget\packages\system.drawing.common\10.0.5\lib\net9.0\System.Private.Windows.GdiPlus.dll
1>C:\Users\nlogozzo\OneDrive\Documents\Programming\Desktop\Nickvision.Desktop.GNOME\Helpers\HostApplicationBuilderExtensions.cs(37,13,37,47): warning IL2091: 'TService' generic argument does not satisfy 'DynamicallyAccessedMemberTypes.PublicConstructors' in 'Microsoft.Extensions.DependencyInjection.ServiceCollectionServiceExtensions.AddSingleton<TService>(IServiceCollection)'. The generic parameter 'T' of 'Nickvision.Desktop.GNOME.Helpers.HostApplicationBuilderExtensions.extension(Microsoft.Extensions.Hosting.IHostApplicationBuilder).ConfigureAdw<T>(Boolean, Boolean)' does not have matching annotations. The source value must declare at least the same requirements as those declared on the target location it is assigned to.
1>  Nickvision.Desktop.GNOME -> C:\Users\nlogozzo\OneDrive\Documents\Programming\Desktop\Nickvision.Desktop.GNOME\bin\Debug\net9.0\Nickvision.Desktop.GNOME.dll
1>C:\Users\nlogozzo\OneDrive\Documents\Programming\Desktop\Nickvision.Desktop.GNOME\Helpers\HostApplicationBuilderExtensions.cs(37,13,37,47): warning IL2091: 'TService' generic argument does not satisfy 'DynamicallyAccessedMemberTypes.PublicConstructors' in 'Microsoft.Extensions.DependencyInjection.ServiceCollectionServiceExtensions.AddSingleton<TService>(IServiceCollection)'. The generic parameter 'T' of 'Nickvision.Desktop.GNOME.Helpers.HostApplicationBuilderExtensions.extension(Microsoft.Extensions.Hosting.IHostApplicationBuilder).ConfigureAdw<T>(Boolean, Boolean)' does not have matching annotations. The source value must declare at least the same requirements as those declared on the target location it is assigned to.
1>  Nickvision.Desktop.GNOME -> C:\Users\nlogozzo\OneDrive\Documents\Programming\Desktop\Nickvision.Desktop.GNOME\bin\Debug\net10.0\Nickvision.Desktop.GNOME.dll
1>C:\Users\nlogozzo\OneDrive\Documents\Programming\Desktop\Nickvision.Desktop.GNOME\Helpers\HostApplicationBuilderExtensions.cs(37,13,37,47): warning IL2091: 'TService' generic argument does not satisfy 'DynamicallyAccessedMemberTypes.PublicConstructors' in 'Microsoft.Extensions.DependencyInjection.ServiceCollectionServiceExtensions.AddSingleton<TService>(IServiceCollection)'. The generic parameter 'T' of 'Nickvision.Desktop.GNOME.Helpers.HostApplicationBuilderExtensions.extension(Microsoft.Extensions.Hosting.IHostApplicationBuilder).ConfigureAdw<T>(Boolean, Boolean)' does not have matching annotations. The source value must declare at least the same requirements as those declared on the target location it is assigned to.
1>  Nickvision.Desktop.GNOME -> C:\Users\nlogozzo\OneDrive\Documents\Programming\Desktop\Nickvision.Desktop.GNOME\bin\Debug\net10.0-windows10.0.19041.0\Nickvision.Desktop.GNOME.dll
1>C:\Users\nlogozzo\OneDrive\Documents\Programming\Desktop\Nickvision.Desktop.GNOME\Helpers\HostApplicationBuilderExtensions.cs(37,13,37,47): warning IL2091: 'TService' generic argument does not satisfy 'DynamicallyAccessedMemberTypes.PublicConstructors' in 'Microsoft.Extensions.DependencyInjection.ServiceCollectionServiceExtensions.AddSingleton<TService>(IServiceCollection)'. The generic parameter 'T' of 'Nickvision.Desktop.GNOME.Helpers.HostApplicationBuilderExtensions.extension(Microsoft.Extensions.Hosting.IHostApplicationBuilder).ConfigureAdw<T>(Boolean, Boolean)' does not have matching annotations. The source value must declare at least the same requirements as those declared on the target location it is assigned to.
1>  Nickvision.Desktop.GNOME -> C:\Users\nlogozzo\OneDrive\Documents\Programming\Desktop\Nickvision.Desktop.GNOME\bin\Debug\net9.0-windows10.0.19041.0\Nickvision.Desktop.GNOME.dll
1>  The package Nickvision.Desktop.GNOME.2026.3.3 is missing a readme. Go to https://aka.ms/nuget/authoring-best-practices/readme to learn why package readmes are important.
1>  Successfully created package 'C:\Users\nlogozzo\OneDrive\Documents\Programming\Desktop\Nickvision.Desktop.GNOME\bin\Debug\Nickvision.Desktop.GNOME.2026.3.3.nupkg'.
2>C:\Users\nlogozzo\OneDrive\Documents\Programming\Desktop\Nickvision.Desktop.WinUI\Converters\BoolToDoubleConverter.cs(6,14,6,35): warning CsWinRT1028: Class 'BoolToDoubleConverter' implements WinRT interfaces but it or a parent type isn't marked partial.  Type and any parent types should be marked partial for trimming and AOT compatibility if passed across the WinRT ABI. (https://github.com/microsoft/CsWinRT/tree/master/src/Authoring/WinRT.SourceGenerator/AnalyzerReleases.Shipped.md)
2>C:\Users\nlogozzo\OneDrive\Documents\Programming\Desktop\Nickvision.Desktop.WinUI\Converters\BoolToStyleConverter.cs(7,14,7,34): warning CsWinRT1028: Class 'BoolToStyleConverter' implements WinRT interfaces but it or a parent type isn't marked partial.  Type and any parent types should be marked partial for trimming and AOT compatibility if passed across the WinRT ABI. (https://github.com/microsoft/CsWinRT/tree/master/src/Authoring/WinRT.SourceGenerator/AnalyzerReleases.Shipped.md)
2>C:\Users\nlogozzo\OneDrive\Documents\Programming\Desktop\Nickvision.Desktop.WinUI\Converters\BoolToVisibilityConverter.cs(7,14,7,39): warning CsWinRT1028: Class 'BoolToVisibilityConverter' implements WinRT interfaces but it or a parent type isn't marked partial.  Type and any parent types should be marked partial for trimming and AOT compatibility if passed across the WinRT ABI. (https://github.com/microsoft/CsWinRT/tree/master/src/Authoring/WinRT.SourceGenerator/AnalyzerReleases.Shipped.md)
2>C:\Users\nlogozzo\OneDrive\Documents\Programming\Desktop\Nickvision.Desktop.WinUI\Converters\IntToBoolConverter.cs(6,14,6,32): warning CsWinRT1028: Class 'IntToBoolConverter' implements WinRT interfaces but it or a parent type isn't marked partial.  Type and any parent types should be marked partial for trimming and AOT compatibility if passed across the WinRT ABI. (https://github.com/microsoft/CsWinRT/tree/master/src/Authoring/WinRT.SourceGenerator/AnalyzerReleases.Shipped.md)
2>C:\Users\nlogozzo\OneDrive\Documents\Programming\Desktop\Nickvision.Desktop.WinUI\Converters\NullableToVisibilityConverter.cs(7,14,7,43): warning CsWinRT1028: Class 'NullableToVisibilityConverter' implements WinRT interfaces but it or a parent type isn't marked partial.  Type and any parent types should be marked partial for trimming and AOT compatibility if passed across the WinRT ABI. (https://github.com/microsoft/CsWinRT/tree/master/src/Authoring/WinRT.SourceGenerator/AnalyzerReleases.Shipped.md)
2>C:\Users\nlogozzo\OneDrive\Documents\Programming\Desktop\Nickvision.Desktop.WinUI\Converters\StringToVisibilityConverter.cs(7,14,7,41): warning CsWinRT1028: Class 'StringToVisibilityConverter' implements WinRT interfaces but it or a parent type isn't marked partial.  Type and any parent types should be marked partial for trimming and AOT compatibility if passed across the WinRT ABI. (https://github.com/microsoft/CsWinRT/tree/master/src/Authoring/WinRT.SourceGenerator/AnalyzerReleases.Shipped.md)
2>C:\Users\nlogozzo\OneDrive\Documents\Programming\Desktop\Nickvision.Desktop.WinUI\Converters\VisibilityToBoolConverter.cs(7,14,7,39): warning CsWinRT1028: Class 'VisibilityToBoolConverter' implements WinRT interfaces but it or a parent type isn't marked partial.  Type and any parent types should be marked partial for trimming and AOT compatibility if passed across the WinRT ABI. (https://github.com/microsoft/CsWinRT/tree/master/src/Authoring/WinRT.SourceGenerator/AnalyzerReleases.Shipped.md)
2>C:\Users\nlogozzo\OneDrive\Documents\Programming\Desktop\Nickvision.Desktop.WinUI\Helpers\HostApplicationBuilderExtensions.cs(29,13,29,47): warning IL2091: 'TService' generic argument does not satisfy 'DynamicallyAccessedMemberTypes.PublicConstructors' in 'Microsoft.Extensions.DependencyInjection.ServiceCollectionServiceExtensions.AddSingleton<TService>(IServiceCollection)'. The generic parameter 'T' of 'Nickvision.Desktop.WinUI.Helpers.HostApplicationBuilderExtensions.extension(Microsoft.Extensions.Hosting.IHostApplicationBuilder).ConfigureWinUI<T>()' does not have matching annotations. The source value must declare at least the same requirements as those declared on the target location it is assigned to.
2>C:\Users\nlogozzo\OneDrive\Documents\Programming\Desktop\Nickvision.Desktop.WinUI\Converters\BoolToDoubleConverter.cs(6,14,6,35): warning CsWinRT1028: Class 'BoolToDoubleConverter' implements WinRT interfaces but it or a parent type isn't marked partial.  Type and any parent types should be marked partial for trimming and AOT compatibility if passed across the WinRT ABI. (https://github.com/microsoft/CsWinRT/tree/master/src/Authoring/WinRT.SourceGenerator/AnalyzerReleases.Shipped.md)
2>C:\Users\nlogozzo\OneDrive\Documents\Programming\Desktop\Nickvision.Desktop.WinUI\Converters\BoolToStyleConverter.cs(7,14,7,34): warning CsWinRT1028: Class 'BoolToStyleConverter' implements WinRT interfaces but it or a parent type isn't marked partial.  Type and any parent types should be marked partial for trimming and AOT compatibility if passed across the WinRT ABI. (https://github.com/microsoft/CsWinRT/tree/master/src/Authoring/WinRT.SourceGenerator/AnalyzerReleases.Shipped.md)
2>C:\Users\nlogozzo\OneDrive\Documents\Programming\Desktop\Nickvision.Desktop.WinUI\Converters\BoolToVisibilityConverter.cs(7,14,7,39): warning CsWinRT1028: Class 'BoolToVisibilityConverter' implements WinRT interfaces but it or a parent type isn't marked partial.  Type and any parent types should be marked partial for trimming and AOT compatibility if passed across the WinRT ABI. (https://github.com/microsoft/CsWinRT/tree/master/src/Authoring/WinRT.SourceGenerator/AnalyzerReleases.Shipped.md)
2>C:\Users\nlogozzo\OneDrive\Documents\Programming\Desktop\Nickvision.Desktop.WinUI\Converters\IntToBoolConverter.cs(6,14,6,32): warning CsWinRT1028: Class 'IntToBoolConverter' implements WinRT interfaces but it or a parent type isn't marked partial.  Type and any parent types should be marked partial for trimming and AOT compatibility if passed across the WinRT ABI. (https://github.com/microsoft/CsWinRT/tree/master/src/Authoring/WinRT.SourceGenerator/AnalyzerReleases.Shipped.md)
2>C:\Users\nlogozzo\OneDrive\Documents\Programming\Desktop\Nickvision.Desktop.WinUI\Converters\NullableToVisibilityConverter.cs(7,14,7,43): warning CsWinRT1028: Class 'NullableToVisibilityConverter' implements WinRT interfaces but it or a parent type isn't marked partial.  Type and any parent types should be marked partial for trimming and AOT compatibility if passed across the WinRT ABI. (https://github.com/microsoft/CsWinRT/tree/master/src/Authoring/WinRT.SourceGenerator/AnalyzerReleases.Shipped.md)
2>C:\Users\nlogozzo\OneDrive\Documents\Programming\Desktop\Nickvision.Desktop.WinUI\Converters\StringToVisibilityConverter.cs(7,14,7,41): warning CsWinRT1028: Class 'StringToVisibilityConverter' implements WinRT interfaces but it or a parent type isn't marked partial.  Type and any parent types should be marked partial for trimming and AOT compatibility if passed across the WinRT ABI. (https://github.com/microsoft/CsWinRT/tree/master/src/Authoring/WinRT.SourceGenerator/AnalyzerReleases.Shipped.md)
2>C:\Users\nlogozzo\OneDrive\Documents\Programming\Desktop\Nickvision.Desktop.WinUI\Converters\VisibilityToBoolConverter.cs(7,14,7,39): warning CsWinRT1028: Class 'VisibilityToBoolConverter' implements WinRT interfaces but it or a parent type isn't marked partial.  Type and any parent types should be marked partial for trimming and AOT compatibility if passed across the WinRT ABI. (https://github.com/microsoft/CsWinRT/tree/master/src/Authoring/WinRT.SourceGenerator/AnalyzerReleases.Shipped.md)
2>C:\Users\nlogozzo\OneDrive\Documents\Programming\Desktop\Nickvision.Desktop.WinUI\Helpers\HostApplicationBuilderExtensions.cs(29,13,29,47): warning IL2091: 'TService' generic argument does not satisfy 'DynamicallyAccessedMemberTypes.PublicConstructors' in 'Microsoft.Extensions.DependencyInjection.ServiceCollectionServiceExtensions.AddSingleton<TService>(IServiceCollection)'. The generic parameter 'T' of 'Nickvision.Desktop.WinUI.Helpers.HostApplicationBuilderExtensions.extension(Microsoft.Extensions.Hosting.IHostApplicationBuilder).ConfigureWinUI<T>()' does not have matching annotations. The source value must declare at least the same requirements as those declared on the target location it is assigned to.
2>  Nickvision.Desktop.WinUI -> C:\Users\nlogozzo\OneDrive\Documents\Programming\Desktop\Nickvision.Desktop.WinUI\bin\Debug\net9.0-windows10.0.19041.0\Nickvision.Desktop.WinUI.dll
2>  Nickvision.Desktop.WinUI -> C:\Users\nlogozzo\OneDrive\Documents\Programming\Desktop\Nickvision.Desktop.WinUI\bin\Debug\net10.0-windows10.0.19041.0\Nickvision.Desktop.WinUI.dll
2>  The package Nickvision.Desktop.WinUI.2026.3.2 is missing a readme. Go to https://aka.ms/nuget/authoring-best-practices/readme to learn why package readmes are important.
2>  Successfully created package 'C:\Users\nlogozzo\OneDrive\Documents\Programming\Desktop\Nickvision.Desktop.WinUI\bin\Debug\Nickvision.Desktop.WinUI.2026.3.2.nupkg'.
========== Build: 2 succeeded, 0 failed, 2 up-to-date, 0 skipped ==========
========== Build completed at 11:19 PM and took 02.056 seconds ==========

Copy link
Contributor

Copilot AI commented Mar 20, 2026

@nlogozzo I've opened a new pull request, #7, to work on those changes. Once the pull request is ready, I'll request review from you.

Copilot AI and others added 3 commits March 20, 2026 03:25
Co-authored-by: nlogozzo <17648453+nlogozzo@users.noreply.github.com>
Co-authored-by: nlogozzo <17648453+nlogozzo@users.noreply.github.com>
Fix IL2091 and CsWinRT1028 warnings for trimming and Native AOT support
@nlogozzo nlogozzo marked this pull request as ready for review March 20, 2026 13:29
@nlogozzo nlogozzo merged commit 3bd05c5 into main Mar 20, 2026
11 checks passed
@nlogozzo nlogozzo deleted the fix/aot branch March 20, 2026 13:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants