dotnet / maui

.NET MAUI is the .NET Multi-platform App UI, a framework for building native device applications spanning mobile, tablet, and desktop.
https://dot.net/maui
MIT License
21.87k stars 1.68k forks source link

MAUI workload is missing Microsoft.NETCore.App.Runtime.Mono.win-arm64 #23016

Open daltzctr opened 1 month ago

daltzctr commented 1 month ago

Description

MAUI workload is missing the runtime for Arm64 Windows. This makes it impossible to build Arm64 packages without manually installing the runtime.

Steps to Reproduce

  1. Create a new MAUI app
  2. Open Tools -> Developer Powershell
  3. Build project with -r win-arm64
  4. Observe missing Microsoft.NETCore.App.Runtime.Mono.win-arm64 error

Link to public reproduction project repository

No response

Version with bug

Unknown/Other

Is this a regression from previous behavior?

Yes, this used to work in .NET MAUI

Last version that worked well

Unknown/Other

Affected platforms

Windows

Affected platform versions

Windows Arm 64

Did you find any workaround?

<UseMonoRuntime>false</UseMonoRuntime>

Relevant log output

No response

github-actions[bot] commented 1 month ago

Hi I'm an AI powered bot that finds similar issues based off the issue title.

Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it. Thank you!

Closed similar issues:

Note: You can give me feedback by thumbs upping or thumbs downing this comment.

Redth commented 1 month ago

Seems that UseMonoRuntime is getting set to True for some reason. That is causing the mono runtime package reference to be expected (which doesn't exist and shouldn't be needed for windows).

You can force things to build with: dotnet build -r win-arm64 -f net8.0-windows10.0.19041.0 -p:UseMonoRuntime=false -p:Platform=Arm64 for now

lewing commented 1 month ago

When you use -r win-arm64 you are overriding any project settings that change that value for a specific app. That makes the android build try to build an android app targeting win-arm64 which isn't a thing.

daltzctr commented 1 month ago

The framework target means the android build isn't even touched, and the error isn't even remotely related to Android. -r is the only supported way to cross-target Arm64 for a WinUI3 app.