Closed CRidge closed 3 years ago
Thanks, I've got a repro of this as well and an idea to fix it. Unfortunately there's a few places the template can end up and I'm not checking one of them.
I'm facing the same issue:
` Recommendation: Install Missing SDK Packs ──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
! Attempt to fix? [y/n] (y): y » Attempting to fix: .NET SDK - Packs (6.0.100-preview.4.21215.1) Installing Pack: Microsoft.Maui.Templates... The following template packages will be installed: C:\Users\XXXX\AppData\Local\Temp\Microsoft.Maui.Templates.6.0.100-preview.3.322.nupkg
Object reference not set to an instance of an object.
at Microsoft.TemplateEngine.Cli.TemplatePackageCoordinator.EnterInstallFlowAsync(INewCommandInput commandInput, CancellationToken cancellationToken) in Microsoft.TemplateEngine.Cli.dll:token 0x600018b+0x2f6
at Microsoft.TemplateEngine.Cli.New3Command.ExecuteAsync() in Microsoft.TemplateEngine.Cli.dll:token 0x6000148+0x381
at Microsoft.TemplateEngine.Cli.CommandParsing.NewCommandInputCli.<>c__DisplayClass102_0.<
.NET SDK - Packs (6.0.100-preview.4.21215.1) Checkup... Looking for pack: Microsoft.Maui.Templates (6.0.100-preview.3.322) Looking for template pack on disk: C:\Program Files\dotnet\template-packs Newest dotnet sdk version to look for templates in: C:\Users\jaime.aquino.templateengine\dotnetcli\v6.0.100-preview.4.21215.1\packages ¡ Microsoft.Maui.Templates (6.0.100-preview.3.322) not installed.`
@Redth The latest commits you've done related to the manifest fixes the issue. I'm facing another one, the system don't find Microsoft.Maun package, but I haven't investigate it yet. I'll take a look.
Cheers
Installing loop again , how to review the errors?
I got the same error
⏳ Attempting to fix: .NET SDK - Packs (6.0.100-preview.4.21255.9)
Installing Pack: Microsoft.Maui.Templates...
/bin/zsh -c 'sudo rm -rf "/var/folders/58/dt3f4lyx2ds7mwjqn_7639r00000gn/T/tmpSn7loo.tmp"'
/bin/zsh -c 'sudo mkdir -p "/var/folders/58/dt3f4lyx2ds7mwjqn_7639r00000gn/T" && sudo cp -pP "/var/folders/58/dt3f4lyx2ds7mwjqn_7639r00000gn/T/tmpSn7loo.tmp" "/var/folders/58/dt3f4lyx2ds7mwjqn_7639r00000gn/T/Microsoft.Maui.Templates.6.0.100-preview.4.634.nupkg"'
System.IO.FileLoadException: Could not load file or assembly 'Microsoft.Extensions.DependencyModel, Version=6.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60'. A device attached to the system is not functioning.
(0x8007001F)
File name: 'Microsoft.Extensions.DependencyModel, Version=6.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60'
at Microsoft.DotNet.Cli.Utils.FrameworkDependencyFile..ctor()
at Microsoft.DotNet.Tools.New.NewCommandShim.CreateHost(Boolean disableSdkTemplates) in dotnet.dll:token 0x60002f5+0xd6
at Microsoft.DotNet.Tools.New.NewCommandShim.Run(String[] args) in dotnet.dll:token 0x60002f4+0x77
at Microsoft.DotNet.Cli.Program.ProcessArgs(String[] args, TimeSpan startupTime, ITelemetry telemetryClient) in dotnet.dll:token 0x6000918+0x2e8
at Microsoft.DotNet.Cli.Program.Main(String[] args) in dotnet.dll:token 0x6000916+0x6f
Failed to install Pack: Microsoft.Maui.Templates.
System.Exception: Failed to install Pack: Microsoft.Maui.Templates.
Update With adding --dev it works!
I got this too, with .NET 6 Preview 5, had to manually dotnet new -i Microsoft.Maui.Templates
Fixed in newer versions/previews.
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
──────────────────────────────────────────────────────────────────────────────── ¤ 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...
──────────────────────────────────────────────────────────────────────────────── ¤ 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?