question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. ItΒ collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Fails to install Microsoft.Maui.Templates

See original GitHub issue

I’m trying to follow the guide found here to play around with Maui.

The first time I run the maui-check tool, it installed a few things, but I couldn’t get my example to run. So I tried running the tool again, and it said β€œMicrosoft.Maui.Templates” was missing and it tried to re-install it, but it doesn’t seem to be able to. It doesn’t log what goes wrong, it just doesn’t find it on the next run. I don’t find it in my packs folder either.

The output from a run (maui-check -dnf) is:

` _ _ _____ _____ __ __ _ _ _ ___
| \ | | | | | | | / | / \ | | | | | |
| | | | | | | | |/| | / _ \ | | | | | |
_ | |\ | | |
| | | | | | / ___ \ | |
| | | |
(
) || _| |_____| || || || // _\ _/ ||

Β€ .NET MAUI Check Β€ ──────────────────────────────────────────────────────────────────────────────── This tool will attempt to evaluate your .NET MAUI development environment. If problems are detected, this tool may offer the option to try and fix them for you, or suggest a way to fix them yourself.

Thanks for choosing .NET MAUI! ──────────────────────────────────────────────────────────────────────────────── Β» Synchronizing configuration… ok Β» Scheduling appointments… ok

OpenJDK 1.8.0-1 Checkup…

  • 1.8.0-25 (C:\Program Files\Android\Jdk\microsoft_dist_openjdk_1.8.0.25\bin..)

Visual Studio 16.9.0 Checkup…

  • 16.10.0-pre.1.0 - C:\Program Files (x86)\Microsoft Visual Studio\2019\Preview
  • 16.8.4

Android SDK Checkup…

  • emulator (30.5.4)
  • build-tools;30.0.2 (30.0.2)
  • platforms;android-30 (3)
  • system-images;android-30;google_apis;x86 (9)
  • platform-tools (31.0.1)

Android Emulator Checkup…

  • Emulator: Android_Accelerated_x86_Oreo found.

.NET SDK Checkup…

  • 2.1.201 - C:\Program Files\dotnet\sdk\2.1.201
  • 2.1.202 - C:\Program Files\dotnet\sdk\2.1.202
  • 2.1.300-preview1-008174 - C:\Program Files\dotnet\sdk\2.1.300-preview1-008174
  • 2.1.301 - C:\Program Files\dotnet\sdk\2.1.301
  • 2.1.400 - C:\Program Files\dotnet\sdk\2.1.400
  • 2.1.401 - C:\Program Files\dotnet\sdk\2.1.401
  • 2.1.402 - C:\Program Files\dotnet\sdk\2.1.402
  • 2.1.403 - C:\Program Files\dotnet\sdk\2.1.403
  • 2.1.523 - C:\Program Files\dotnet\sdk\2.1.523
  • 2.1.600-preview-009472 - C:\Program Files\dotnet\sdk\2.1.600-preview-009472
  • 2.1.600 - C:\Program Files\dotnet\sdk\2.1.600
  • 2.1.601 - C:\Program Files\dotnet\sdk\2.1.601
  • 2.1.617 - C:\Program Files\dotnet\sdk\2.1.617
  • 2.1.700 - C:\Program Files\dotnet\sdk\2.1.700
  • 2.1.800-preview-009677 - C:\Program Files\dotnet\sdk\2.1.800-preview-009677
  • 2.1.815 - C:\Program Files\dotnet\sdk\2.1.815
  • 2.2.101 - C:\Program Files\dotnet\sdk\2.2.101
  • 2.2.104 - C:\Program Files\dotnet\sdk\2.2.104
  • 2.2.107 - C:\Program Files\dotnet\sdk\2.2.107
  • 2.2.108 - C:\Program Files\dotnet\sdk\2.2.108
  • 2.2.200-preview-009648 - C:\Program Files\dotnet\sdk\2.2.200-preview-009648
  • 2.2.200-preview-009748 - C:\Program Files\dotnet\sdk\2.2.200-preview-009748
  • 2.2.200 - C:\Program Files\dotnet\sdk\2.2.200
  • 2.2.201 - C:\Program Files\dotnet\sdk\2.2.201
  • 2.2.202 - C:\Program Files\dotnet\sdk\2.2.202
  • 2.2.300 - C:\Program Files\dotnet\sdk\2.2.300
  • 2.2.400-preview-010195 - C:\Program Files\dotnet\sdk\2.2.400-preview-010195
  • 2.2.401 - C:\Program Files\dotnet\sdk\2.2.401
  • 3.0.100 - C:\Program Files\dotnet\sdk\3.0.100
  • 3.1.113 - C:\Program Files\dotnet\sdk\3.1.113
  • 3.1.201 - C:\Program Files\dotnet\sdk\3.1.201
  • 3.1.300 - C:\Program Files\dotnet\sdk\3.1.300
  • 5.0.102 - C:\Program Files\dotnet\sdk\5.0.102
  • 5.0.104 - C:\Program Files\dotnet\sdk\5.0.104
  • 5.0.200-preview.21077.7 - C:\Program Files\dotnet\sdk\5.0.200-preview.21077.7
  • 6.0.100-preview.3.21202.5 - C:\Program Files\dotnet\sdk\6.0.100-preview.3.21202.5

.NET SDK - EnableWorkloadResolver.sentinel Checkup…

  • C:\Program Files (x86)\Microsoft Visual Studio\2019\Preview\MSBuild\Current\Bin\SdkResolvers\Microsoft.DotNet.MSBuildSdk Resolver\EnableWorkloadResolver.sentinel exists.
  • C:\Program Files\dotnet\sdk\6.0.100-preview.3.21202.5\EnableWorkloadResolver.sentinel exists.

.NET SDK - Workloads (6.0.100-preview.3.21202.5) Checkup…

  • microsoft-android-sdk-full (Microsoft.NET.Workload.Android : 11.0.200-preview.3.196) installed.
  • microsoft-ios-sdk-full (Microsoft.NET.Workload.iOS : 14.4.100-preview.3.1326) installed.
  • microsoft-maccatalyst-sdk-full (Microsoft.NET.Workload.MacCatalyst : 14.3.100-preview.3.471) installed.
  • microsoft-tvos-sdk-full (Microsoft.NET.Workload.tvOS : 14.3.100-preview.3.1379) installed.
  • microsoft-macos-sdk-full (Microsoft.NET.Workload.macOS : 11.1.100-preview.3.1379) installed.

.NET SDK - Packs (6.0.100-preview.3.21202.5) Checkup… Β‘ Microsoft.Maui.Templates (6.0.100-preview.3.322) not installed.

  • Microsoft.iOS.Windows.Sdk (14.4.100-preview.3.1326) installed.
  • Microsoft.Android.Sdk (11.0.200-preview.3.196) installed.
  • Microsoft.Android.Sdk.BundleTool (11.0.200-preview.3.196) installed.
  • Microsoft.Android.Ref (11.0.200-preview.3.196) installed.
  • Microsoft.Android.Templates (11.0.200-preview.3.196) installed.
  • Microsoft.iOS.Sdk (14.4.100-preview.3.1326) installed.
  • Microsoft.iOS.Ref (14.4.100-preview.3.1326) installed.
  • Microsoft.iOS.Templates (14.4.100-preview.3.1326) installed.
  • Microsoft.MacCatalyst.Sdk (14.3.100-preview.3.471) installed.
  • Microsoft.MacCatalyst.Ref (14.3.100-preview.3.471) installed.
  • Microsoft.MacCatalyst.Templates (14.3.100-preview.3.471) installed.
  • Microsoft.tvOS.Sdk (14.3.100-preview.3.1379) installed.
  • Microsoft.tvOS.Ref (14.3.100-preview.3.1379) installed.
  • Microsoft.tvOS.Templates (14.3.100-preview.3.1379) installed.
  • Microsoft.macOS.Sdk (11.1.100-preview.3.1379) installed.
  • Microsoft.macOS.Ref (11.1.100-preview.3.1379) installed.
  • Microsoft.macOS.Templates (11.1.100-preview.3.1379) installed.

──────────────────────────────────────────────────────────────────────────────── Β€ Recommendation: Install Missing SDK Packs ────────────────────────────────────────────────────────────────────────────────

Β» Attempting to fix: .NET SDK - Packs (6.0.100-preview.3.21202.5) Installing Pack: Microsoft.Maui.Templates… Installed Pack: Microsoft.Maui.Templates. Fix applied. Checking again…

.NET SDK - Packs (6.0.100-preview.3.21202.5) Checkup… Β‘ Microsoft.Maui.Templates (6.0.100-preview.3.322) not installed.

  • Microsoft.iOS.Windows.Sdk (14.4.100-preview.3.1326) installed.
  • Microsoft.Android.Sdk (11.0.200-preview.3.196) installed.
  • Microsoft.Android.Sdk.BundleTool (11.0.200-preview.3.196) installed.
  • Microsoft.Android.Ref (11.0.200-preview.3.196) installed.
  • Microsoft.Android.Templates (11.0.200-preview.3.196) installed.
  • Microsoft.iOS.Sdk (14.4.100-preview.3.1326) installed.
  • Microsoft.iOS.Ref (14.4.100-preview.3.1326) installed.
  • Microsoft.iOS.Templates (14.4.100-preview.3.1326) installed.
  • Microsoft.MacCatalyst.Sdk (14.3.100-preview.3.471) installed.
  • Microsoft.MacCatalyst.Ref (14.3.100-preview.3.471) installed.
  • Microsoft.MacCatalyst.Templates (14.3.100-preview.3.471) installed.
  • Microsoft.tvOS.Sdk (14.3.100-preview.3.1379) installed.
  • Microsoft.tvOS.Ref (14.3.100-preview.3.1379) installed.
  • Microsoft.tvOS.Templates (14.3.100-preview.3.1379) installed.
  • Microsoft.macOS.Sdk (11.1.100-preview.3.1379) installed.
  • Microsoft.macOS.Ref (11.1.100-preview.3.1379) installed.
  • Microsoft.macOS.Templates (11.1.100-preview.3.1379) installed.

──────────────────────────────────────────────────────────────────────────────── Β€ Recommendation: Install Missing SDK Packs ────────────────────────────────────────────────────────────────────────────────

────────────────────────────────────────────────────────────────────────────────

! There were one or more problems detected. Please review the errors and correct them and run maui-check again. `

I’ve tried the --verbose flag without getting any more information about why it fails. Installation of the pack obviously fails somehow - how can I find out what went wrong?

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:7 (2 by maintainers)

github_iconTop GitHub Comments

19reactions
markrendlecommented, Jun 22, 2021

I got this too, with .NET 6 Preview 5, had to manually dotnet new -i Microsoft.Maui.Templates

1reaction
Redthcommented, Aug 11, 2021

Fixed in newer versions/previews.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Troubleshoot known issues - .NET MAUI
Learn about .NET MAUI known issues and troubleshooting you can do to resolve these issues.
Read more >
.net MAUI templates not in Visual Studio 2022 community - ...
I've tried reinstalling and restarting several times. The MAUI templates just wont show up, even though the module is installed. Any help to...
Read more >
the maui template doesn't compile : r/dotnet
Hi everyone! I am new in dotnet and try to write a first app but. I can't compile it for windows 11 and...
Read more >
Installing template for .NET MAUI in Visual Studio 2022
After some research, I have found that version 17.3.x needs to be installed to get the .NET MAUI template, Currently, as of (02/06/2022),...
Read more >
Setting up your Mac for .NET MAUI in 2023 | by Saurav Sahu
1. Install pre-requisites Β· 2. Install Visual Studio Code (Duh) Β· 3. Install .NET SDK Β· 4. Install the MAUI workload Β· 5.1....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found