Skip to content

Feature band 2xx releases fail to publish .NET MAUI apps under unknown conditions #54129

Closed

Description

@LorenzoLotti

Disclaimer: even if this issue references .NET MAUI, I think it is more of an SDK bug considering that this problem disappears when using different feature band of the SDK but same .NET Runtime version.

Describe the bug

While the 1xx feature band works as expected, all versions of the .NET 10 SDK that are part of the 2xx feature band fail to publish .NET MAUI projects when they match currently unknown conditions.

Here the publish command:

dotnet publish ***.csproj -c Release -f net10.0-android -o *** -p:AndroidKeyStore=true -p:AndroidSigningKeyStore=D:\a\_temp\aip.keystore -p:AndroidSigningKeyAlias=aip -p:AndroidSigningKeyPass=*** -p:AndroidSigningStorePass=***

Here the error message I get:

Error NU1102: Unable to find package Microsoft.NETCore.App.Runtime.Mono.win-x64 with version (= 10.0.7)
  - Found 117 version(s) in nuget [ Nearest version: 9.0.0-preview.7.24405.7 ]
  - Found 117 version(s) in my_personal_feed [ Nearest version: 9.0.0-preview.7.24405.7 ]
  - Found 0 version(s) in C:\hostedtoolcache\windows\dotnet\library-packs

which makes no sense considering that:

  • Microsoft.NETCore.App.Runtime.Mono.win-x64 is deprecated and no newer version has been released since v9.0.0-preview.7.24405.7
  • I was targeting net10.0-android
  • the specifc MAUI project I was publishing is Android+iOS only and does not targets in any way Windows.

To Reproduce

I originally experienced this problem by running the publish command over an Azure Pipeline (thus a clean environment; Windows in this case), and right now I'm unable to reproduce it locally.

Further details about said MAUI project

It not only uses the standard NuGet feed but it also uses another private feed. This is achived via the following nuget.config (this is just an example):

<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <packageSources>
    <!--To inherit the global NuGet package sources remove the <clear/> line below -->
    <clear />
    <add key="nuget" value="https://api.nuget.org/v3/index.json" />
    <add key="my_personal_feed" value="https://pkgs.dev.azure.com/CompanyName/_packaging/CompanyName/nuget/v3/index.json" />
  </packageSources>
</configuration>

Activity

  1. marcpopMSFT commented on Jun 1, 2026

    @marcpopMSFT
    Member

    Triage: Can you provide an https://aka.ms/binlog of the failure? I have to assume that this is the restore logic trying to be smart and download additional architecture versions it thinks you might need but being able to trace through and figure out why would help.

    Pinging @jonathanpeppers in case they have a repro of this as well.

  2. jonathanpeppers commented on Jun 2, 2026

    @jonathanpeppers
    Member

    Restoring Microsoft.NETCore.App.Runtime.Mono.win-x64 would happen if you tried to set UseMonoRuntime=true on Windows.

    I've seen this if you set unconditionally in your project. Even if you passed -f net10.0-android it will still try to restore for Windows in a multi-targeted project.

    A .binlog would help investigate further, though.

  3. marcpopMSFT commented on Jun 2, 2026

    @marcpopMSFT
    Member

    @jonathanpeppers do you know how frequently customers have been seeing this? Should we have a known issue or even catch the case and provide a better warning/error? Seems easy enough to workaround.

  4. jonathanpeppers commented on Jul 13, 2026

    @jonathanpeppers
    Member

    I think this issue is now moot in .NET 11, as UseMonoRuntime=true emits an error in all cases:

    We are moving to CoreCLR by default.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions