Skip to content

MAUI template project does not build using the .net CLI #34767

@vsfeedback

Description

@vsfeedback

This issue has been moved from a ticket on Developer Community.


[severity:I'm unable to use this version]
I use Visual Studio 2026.
UI create a new project using the ".NET MAUI App" template for C# .

image.png

I build with Visual Studio: OK.
So the code is "fine".

I need to build it on a GitHub Action, so I try to use the shell to do it.

  • Install MAUI Workload(s)
    dotnet workload install maui
    > Workload(s) 'maui' are already installed.

  • Restore packages
    dotnet restore
    > Restore complete (1,4s)

  • Build
    dotnet build -c Release --no-restore
    It fails.

$ dotnet build --configuration Release --no-restore
  MauiAppNet10 net10.0-maccatalyst maccatalyst-x64 succeeded (7,5s) → bin\Release\net10.0-maccatalyst\maccatalyst-x64\MauiAppNet10.dll
  MauiAppNet10 net10.0-ios iossimulator-x64 succeeded (9,1s) → bin\Release\net10.0-ios\iossimulator-x64\MauiAppNet10.dll
  MauiAppNet10 net10.0-maccatalyst maccatalyst-arm64 failed with 1 error(s) (0,5s)
    C:\Program Files\dotnet\sdk\10.0.201\Sdks\Microsoft.NET.Sdk\targets\Microsoft.PackageDependencyResolution.targets(266,5): error NETSDK1047: Assets file 'D:\Programming\Learning\learning. MAUI\MauiAppNet10\MauiAppNet10\obj\project.assets.json' doesn't have a target for 'net10.0-maccatalyst/maccatalyst-arm64'. Ensure that restore has run and that you have included 'net10.0-maccatalyst' in the TargetFrameworks for your project. You may also need to include 'maccatalyst-arm64' in your project's RuntimeIdentifiers.
  MauiAppNet10 net10.0-windows10.0.19041.0 win-x64 succeeded (41,8s) → bin\Release\net10.0-windows10.0.19041.0\win-x64\MauiAppNet10.dll
  MauiAppNet10 net10.0-android succeeded (137,7s) → bin\Release\net10.0-android\MauiAppNet10.dll

Is aclean solution, from the template without changes.
These are the frameworks:

	<PropertyGroup>
		<TargetFrameworks>net10.0-android</TargetFrameworks>
		<TargetFrameworks Condition="!$([MSBuild]::IsOSPlatform('linux'))">$(TargetFrameworks); net10.0-ios; net10.0-maccatalyst</TargetFrameworks>
		<TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('windows'))">$(TargetFrameworks); net10.0-windows10.0.19041.0</TargetFrameworks>

`[cut]

<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'ios'">15.0</SupportedOSPlatformVersion>
		<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'maccatalyst'">15.0</SupportedOSPlatformVersion>
		<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'android'">21.0</SupportedOSPlatformVersion>
		<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'windows'">10.0.17763.0</SupportedOSPlatformVersion>
		<TargetPlatformMinVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'windows'">10.0.17763.0</TargetPlatformMinVersion>

Original Comments

Feedback Bot on 3/31/2026, 01:24 PM:

We have directed your feedback to the appropriate engineering team for further evaluation. The team will review the feedback and notify you about the next steps.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-templatesProject templates, Item Templates for Blazor and MAUIplatform/macosmacOS / Mac Catalysts/triagedIssue has been revieweds/verifiedVerified / Reproducible Issue ready for Engineering Triage

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions