Skip to content

The Net10 Maui Blazor Hybrid project cannot be packaged #64958

@liangfangyin2

Description

@liangfangyin2

Is there an existing issue for this?

  • I have searched the existing issues

Describe the bug

### 描述
The Net Maui Blazor Hybrid project cannot be packaged
The project I developed using VS2026 is based on the Net10 framework. When I try to package it using the command line, I get an error prompt
Command line:
dotnet publish -c Release -f net10.0-windows10.0.19041.0 -r win-x64

Error returned:

E:\tower-stone-configuration-tool\web\Tool\Tool\Tool.csproj : error NU1102:
I cannot find the package Microsoft.NETCore.App.Runtime.Mono.win-x64 with version (= 10.0.1)

  • Found 113 versions on nuget.org [Nearest version: 9.0.0-preview.7.24405.7]
  • No versions found in Microsoft Visual Studio Offline Packages
  • No versions found in C:\Program Files\dotnet\library-packs

I encountered the same error when switching to the Net9 framework later. Finally, I switched to Net8, but unfortunately, VS 2026 cannot run the Maui Blazor Hybrid project for Net8 now
How to solve this problem is extremely urgent

I hope to release version 10.0.1 of Microsoft.NETCore.App.Runtime.Mono.win-x64 or find other solutions

Image

### 重现
I will first provide you with the solution for the project, which is Tool.csproj

<Project Sdk="Microsoft.NET.Sdk.Razor">

    <PropertyGroup> 
		<TargetFrameworks>net10.0-android;net10.0-ios;net10.0-maccatalyst</TargetFrameworks>
		<!--<TargetFrameworks>net10.0-android;net10.0-ios;net10.0-maccatalyst</TargetFrameworks>-->
        <TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('windows'))">$(TargetFrameworks);net10.0-windows10.0.19041.0</TargetFrameworks>
  
		<!-- Note for MacCatalyst:
            The default runtime is maccatalyst-x64, except in Release config, in which case the default is maccatalyst-x64;maccatalyst-arm64.
            When specifying both architectures, use the plural <RuntimeIdentifiers> instead of the singular <RuntimeIdentifier>.
            The Mac App Store will NOT accept apps with ONLY maccatalyst-arm64 indicated;
            either BOTH runtimes must be indicated or ONLY macatalyst-x64. -->
        <!-- For example: <RuntimeIdentifiers>maccatalyst-x64;maccatalyst-arm64</RuntimeIdentifiers> --> 

		<OutputType>Exe</OutputType>
        <RootNamespace>Tool</RootNamespace>
        <UseMaui>true</UseMaui>
        <SingleProject>true</SingleProject>
        <ImplicitUsings>enable</ImplicitUsings>
        <EnableDefaultCssItems>false</EnableDefaultCssItems>
        <Nullable>enable</Nullable>

        <!-- Display name -->
        <ApplicationTitle>Tool</ApplicationTitle>

        <!-- App Identifier -->
        <ApplicationId>com.companyname.tool</ApplicationId>

        <!-- Versions -->
        <ApplicationDisplayVersion>1.0</ApplicationDisplayVersion>
        <ApplicationVersion>1</ApplicationVersion>

        <!-- To develop, package, and publish an app to the Microsoft Store, see: https://aka.ms/MauiTemplateUnpackaged -->
        <WindowsPackageType>None</WindowsPackageType>

        <SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'ios'">15.0</SupportedOSPlatformVersion>
        <SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'maccatalyst'">15.0</SupportedOSPlatformVersion>
        <SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'android'">24.0</SupportedOSPlatformVersion>
        <SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'windows'">10.0.17763.0</SupportedOSPlatformVersion>
        <TargetPlatformMinVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'windows'">10.0.17763.0</TargetPlatformMinVersion>
        <AssemblyTitle>配置工具</AssemblyTitle>
        <DefaultLanguage>zh-cn</DefaultLanguage>
        <PackAsTool>True</PackAsTool>
        <GenerateAppInstallerFile>False</GenerateAppInstallerFile>
        <AppxPackageSigningEnabled>False</AppxPackageSigningEnabled>
        <AppxPackageSigningTimestampDigestAlgorithm>SHA256</AppxPackageSigningTimestampDigestAlgorithm>
        <AppxAutoIncrementPackageRevision>True</AppxAutoIncrementPackageRevision>
        <AppxSymbolPackageEnabled>False</AppxSymbolPackageEnabled>
        <GenerateTestArtifacts>True</GenerateTestArtifacts>
        <HoursBetweenUpdateChecks>0</HoursBetweenUpdateChecks>

		<WindowsAppSDKSelfContained>true</WindowsAppSDKSelfContained>
		<RuntimeIdentifierOverride>win10-x64</RuntimeIdentifierOverride>
		
    </PropertyGroup>

    <ItemGroup>
        <!-- App Icon -->

        <!-- Splash Screen -->
        <MauiSplashScreen Include="Resources\Splash\splash.svg" Color="#512BD4" BaseSize="128,128" />

        <!-- Images -->
        <MauiImage Include="Resources\Images\*" />
        <MauiImage Update="Resources\Images\dotnet_bot.svg" BaseSize="168,208" />

        <!-- Custom Fonts -->
        <MauiFont Include="Resources\Fonts\*" />

        <!-- Raw Assets (also remove the "Resources\Raw" prefix) -->
        <MauiAsset Include="Resources\Raw\**" LogicalName="%(RecursiveDir)%(Filename)%(Extension)" />
    </ItemGroup>

    <ItemGroup>
      <AndroidResource Remove="Platforms\Android\Resources\mipmap-hdpi\Cover.png" />
      <AndroidResource Remove="Platforms\Android\Resources\mipmap-mdpi\Cover.png" />
      <AndroidResource Remove="Platforms\Android\Resources\mipmap-xhdpi\Cover.png" />
      <AndroidResource Remove="Platforms\Android\Resources\mipmap-xxhdpi\Cover.png" />
      <AndroidResource Remove="Platforms\Android\Resources\mipmap-xxxhdpi\Cover.png" />
    </ItemGroup>

    <ItemGroup>
      <None Include="..\.editorconfig" Link=".editorconfig" />
    </ItemGroup>

    

    <ItemGroup>
        <PackageReference Include="AntDesign" Version="1.5.0" />
        <PackageReference Include="Microsoft.AspNetCore.WebUtilities" Version="9.0.10" />
        <PackageReference Include="Microsoft.Maui.Controls" Version="$(MauiVersion)" />
        <PackageReference Include="Microsoft.AspNetCore.Components.WebView.Maui" Version="$(MauiVersion)" />
        <PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="10.0.0-rc.2.25502.107" />
        <PackageReference Include="Peak.Abp.Silver.Basic" Version="1.0.1" />
    </ItemGroup>

	<ItemGroup Condition="$(TargetFramework.Contains('-android'))">
		<AndroidResource Include="Platforms\Android\Resources\**" />
	</ItemGroup>

    <ItemGroup>
      <ProjectReference Include="..\Tool.Application.Contracts\Tool.Application.Contracts.csproj" />
      <ProjectReference Include="..\Tool.Application\Tool.Application.csproj" />
      <ProjectReference Include="..\Tool.DDD.Core\Tool.DDD.Core.csproj" />
      <ProjectReference Include="..\Tool.Domain.Shared\Tool.Domain.Shared.csproj" />
      <ProjectReference Include="..\Tool.EntityFrameworkCore\Tool.EntityFrameworkCore.csproj" />
    </ItemGroup>

    <ItemGroup>
      <None Update="Platforms\Android\Resources\mipmap-hdpi\Cover.png">
        <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
      </None>
      <None Update="Platforms\Android\Resources\mipmap-mdpi\Cover.png">
        <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
      </None>
      <None Update="Platforms\Android\Resources\mipmap-xhdpi\Cover.png">
        <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
      </None>
      <None Update="Platforms\Android\Resources\mipmap-xxhdpi\Cover.png">
        <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
      </None>
      <None Update="Platforms\Android\Resources\mipmap-xxxhdpi\Cover.png">
        <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
      </None>
      <None Update="Resources\AppIcon\Cover.png">
        <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
      </None>
      <None Update="Resources\AppIcon\favicon.ico">
        <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
      </None>
      <None Update="tool.db">
        <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
      </None>
    </ItemGroup>

</Project>

The implementation steps are as follows:
First, enter the Blazor file Tool

Image Image

Then run cmd under this directory:

Image The general steps are like this. When I used Net8 a long time ago, I also packed it this way. Back then, it was possible to pack

### I hope you can provide a direct solution and a specific timeline, as my project is pending packaging

Expected Behavior

### I hope you can provide a direct solution and a specific timeline, as my project is pending packaging

Steps To Reproduce

You can create a Net Maui Blazor Hybrid project using Vs2026 and then run "dotnet publish -c Release -f net10.0-windows10.0.19041.0 -r win-x64" in the project directory to package. The probability of this issue occurring is 100%. I hope you can resolve it as soon as possible, as it has seriously affected my usage

Exceptions (if any)

No response

.NET Version

dotnet publish -c Release -f net10.0-windows10.0.19041.0 -r win-x64

Anything else?

Vs2026
Create .Net Maui Blazor Hybrid and select .Net 10
项目目录运行:dotnet publish -c Release -f net10.0-windows10.0.19041.0 -r win-x64

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-blazorIncludes: Blazor, Razor Components

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions