Skip to content
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

Enable AoT for net8 in Release #417

Merged
merged 8 commits into from
Jun 3, 2024
Merged

Enable AoT for net8 in Release #417

merged 8 commits into from
Jun 3, 2024

Conversation

Arlodotexe
Copy link
Member

Enables Native AoT functionality when running under .NET 8 in preparation for the WinAppSdk 1.6 release with NativeAoT support.  
 
Prerequisite PR: CommunityToolkit/Tooling-Windows-Submodule#190

@Arlodotexe Arlodotexe self-assigned this May 11, 2024
@Arlodotexe
Copy link
Member Author

This is a Draft PR until this remaining error can be fixed.

 error APPX1101: Payload contains two or more files with the same destination path 'CommunityToolkit.App.WinAppSdk.exe'.

Full error:

       "C:\Users\arlog\source\repos\Labs-Windows\tooling\ProjectHeads\AllComponents\winappsdk\CommunityToolkit.App.WinAppSdk.csproj" (Clean;Build target) (1:7) ->
       (_ComputeAppxPackagePayload target) ->
         C:\Users\arlog\.nuget\packages\microsoft.windowsappsdk\1.5.240311000\buildTransitive\Microsoft.Build.Msix.Packaging.targets(1515,5): error APPX1101: Payload contains two or more files with the same destination path 'CommunityToolkit.App.WinAppSdk.exe'. Source files:  [C:\Users\arlog\source\repos\Labs-Windows\tooling\ProjectHeads\AllComponents\winap 
       psdk\CommunityToolkit.App.WinAppSdk.csproj]
       C:\Users\arlog\.nuget\packages\microsoft.windowsappsdk\1.5.240311000\buildTransitive\Microsoft.Build.Msix.Packaging.targets(1515,5): error APPX1101: C:\Users\arlog\source\repos\Labs-Windows\tooling\ProjectHeads\AllComponents\winappsdk\obj\x64\Release\net8.0-windows10.0.22621.0\win10-x64\apphost.exe [C:\Users\arlog\source\repos\Labs-Windows\tooling\Pr 
       ojectHeads\AllComponents\winappsdk\CommunityToolkit.App.WinAppSdk.csproj]
       C:\Users\arlog\.nuget\packages\microsoft.windowsappsdk\1.5.240311000\buildTransitive\Microsoft.Build.Msix.Packaging.targets(1515,5): error APPX1101: C:\Users\arlog\source\repos\Labs-Windows\tooling\ProjectHeads\AllComponents\winappsdk\bin\x64\Release\net8.0-windows10.0.22621.0\win10-x64\native\CommunityToolkit.App.WinAppSdk.exe [C:\Users\arlog\source 
       \repos\Labs-Windows\tooling\ProjectHeads\AllComponents\winappsdk\CommunityToolkit.App.WinAppSdk.csproj]

The above error is the same for both this repo and in Labs.

@Arlodotexe Arlodotexe added this to the 8.1 milestone May 11, 2024
@michael-hawker
Copy link
Member

This is a Draft PR until this remaining error can be fixed.

 error APPX1101: Payload contains two or more files with the same destination path 'CommunityToolkit.App.WinAppSdk.exe'.

Full error:

       "C:\Users\arlog\source\repos\Labs-Windows\tooling\ProjectHeads\AllComponents\winappsdk\CommunityToolkit.App.WinAppSdk.csproj" (Clean;Build target) (1:7) ->
       (_ComputeAppxPackagePayload target) ->
         C:\Users\arlog\.nuget\packages\microsoft.windowsappsdk\1.5.240311000\buildTransitive\Microsoft.Build.Msix.Packaging.targets(1515,5): error APPX1101: Payload contains two or more files with the same destination path 'CommunityToolkit.App.WinAppSdk.exe'. Source files:  [C:\Users\arlog\source\repos\Labs-Windows\tooling\ProjectHeads\AllComponents\winap 
       psdk\CommunityToolkit.App.WinAppSdk.csproj]
       C:\Users\arlog\.nuget\packages\microsoft.windowsappsdk\1.5.240311000\buildTransitive\Microsoft.Build.Msix.Packaging.targets(1515,5): error APPX1101: C:\Users\arlog\source\repos\Labs-Windows\tooling\ProjectHeads\AllComponents\winappsdk\obj\x64\Release\net8.0-windows10.0.22621.0\win10-x64\apphost.exe [C:\Users\arlog\source\repos\Labs-Windows\tooling\Pr 
       ojectHeads\AllComponents\winappsdk\CommunityToolkit.App.WinAppSdk.csproj]
       C:\Users\arlog\.nuget\packages\microsoft.windowsappsdk\1.5.240311000\buildTransitive\Microsoft.Build.Msix.Packaging.targets(1515,5): error APPX1101: C:\Users\arlog\source\repos\Labs-Windows\tooling\ProjectHeads\AllComponents\winappsdk\bin\x64\Release\net8.0-windows10.0.22621.0\win10-x64\native\CommunityToolkit.App.WinAppSdk.exe [C:\Users\arlog\source 
       \repos\Labs-Windows\tooling\ProjectHeads\AllComponents\winappsdk\CommunityToolkit.App.WinAppSdk.csproj]

The above error is the same for both this repo and in Labs.

@Arlodotexe heard back from the platform team, this is a known issue and expected with 1.5. A fix should be coming in 1.6, so we can start testing that later as we see experimental/preview releases.

For now, let's just turn on the AoT compatible bit/annotations and get that checked-in.

@Arlodotexe Arlodotexe marked this pull request as ready for review May 17, 2024 23:13
@Arlodotexe Arlodotexe enabled auto-merge (rebase) May 18, 2024 17:35
@Arlodotexe
Copy link
Member Author

Here's the error message from the CI:

ExtensionsComponent.Tests.FrameworkElementExtensionsTests.FrameworkElementExtension_RelativeAncestor_FreeParentBaseline_FrameworkElementExtensionsTests_Test 

This seems to be a transient error, so I'll rerun the ci and we'll address it directly if it reproduces consistently.

auto-merge was automatically disabled May 30, 2024 19:35

Rebase failed

@Arlodotexe Arlodotexe merged commit 9fae7ac into main Jun 3, 2024
9 checks passed
@delete-merged-branch delete-merged-branch bot deleted the net8/aot branch June 3, 2024 16:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

None yet

3 participants