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

MAUI Windows CLI publish always fails due to Mono dependency #27215

Open
MSLukeWest opened this issue Jan 18, 2025 · 2 comments
Open

MAUI Windows CLI publish always fails due to Mono dependency #27215

MSLukeWest opened this issue Jan 18, 2025 · 2 comments
Labels
t/bug Something isn't working

Comments

@MSLukeWest
Copy link
Contributor

MSLukeWest commented Jan 18, 2025

Description

If you create a new .NET MAUI app and attempt to publish for Windows, it will fail with:

Unable to find package Microsoft.NETCore.App.Runtime.Mono.win-x64 with version (= 9.0.1)

This is because 9.0.x versions of Microsoft.NETCore.App.Runtime.Mono don't exist, they stopped after 9.0.0 Preview 7. The workaround is to add the property "UseMonoRuntime=false".

UseMonoRuntime=false should be the default in this case.

Steps to Reproduce

  1. dotnet new maui
  2. dotnet publish foo.csproj -c Release -f net9.0-windows10.0.19041.0 -r win-x64 (reproes regardless of RID)

Result: Fails

Unable to find package Microsoft.NETCore.App.Runtime.Mono.win-x64 with version (= 9.0.1)
- Found 103 version(s) in nuget.org [ Nearest version: 9.0.0-preview.7.24405.7 ]
- ...

Link to public reproduction project repository

No response

Version with bug

9.0.30 SR3

Is this a regression from previous behavior?

Yes, this used to work in .NET MAUI

Last version that worked well

9.0.0-preview.7.24407.4

Affected platforms

Windows

Affected platform versions

All

Did you find any workaround?

Append "-p:UseMonoRuntime=false" to the command line arguments.

Relevant log output

@MSLukeWest MSLukeWest added the t/bug Something isn't working label Jan 18, 2025
@MSLukeWest
Copy link
Contributor Author

BinLog: msbuild.binlog.txt

@MSLukeWest
Copy link
Contributor Author

#23016 mentions this as well

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
t/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant