[Bug] Unable to run either maui or maui blazor templates from the command line
See original GitHub issueDescription
I am unable to run the WinUI version of these templates from Visual Studio due to other errors. I am also unable to run it on the command line.
Steps to Reproduce
dotnet new maui-blazor -n MauiBlazor
dotnet run MauiBlzor.WinUI -t:Run -f net6.0-windows10.0.19041
- Observe the following:
C:\Data\Git\_username\MauiBlzor\MauiBlzor.WinUI>dotnet run MauiBlzor.WinUI -t:Run -f net6.0-windows10.0.19041
The launch profile "(Default)" could not be applied.
A usable launch profile could not be located.
C:\Users\R\.nuget\packages\microsoft.projectreunion.winui\0.8.1\buildTransitive\Microsoft.Build.Msix.Packaging.targets(167,18): error MSB4086: A numeric comparison was attempted on "$(registry:HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion@CurrentVersion)" that evaluates to "" instead of a number, in condition "'$(AppxUseResourceIndexerApi)' == '' AND '$(registry:HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion@CurrentVersion)' < '6.3'". [C:\Data\Git\_username\MauiBlzor\MauiBlzor.WinUI\MauiBlzor.WinUI.csproj]
The build failed. Fix the build errors and run again.
Expected Behavior
No idea but not this, presumably some window opens or something, angels sing and … you fill in the rest.
Actual Behavior
It displays the above error message.
Basic Information
- Version with issue: 6.0.100-preview.7.21379.14? This is a fresh first install of MAUI via the new VS2022 preview.
- Last known good version: Never tried before
- IDE: Command line.
- Platform Target Frameworks:
- iOS:
- Android:
- UWP:
- Android Support Library Version:
- Nuget Packages: None
- Affected Devices: Windows 10 computer.
Screenshots
Not a visual issue.
Reproduction Link
Above in the listed steps.
Workaround
No workaround. There are similar errors elsewhere but none of the solutions are things that apply here.
Issue Analytics
- State:
- Created 2 years ago
- Reactions:5
- Comments:11 (5 by maintainers)
Top Results From Across the Web
Troubleshoot known issues - .NET MAUI
NET MAUI either through Visual Studio, or by installing your chosen .NET SDK version and running the dotnet workload install maui command.
Read more >Creating new .NET 6 MAUI project
To search for the templates on NuGet.org, run 'dotnet new maui --search'. So why can't I use this command? c# · maui .net-6.0....
Read more >Sharing Code with Blazor & .NET MAUI
Shared Blazor components can power UI across web & native apps, thanks to .NET MAUI.
Read more >Blazor Hybrid Web Apps with .NET MAUI
MAUI provides a set of technologies that enable apps to run on Web, desktop, and mobile. ... MAUI will be available from Visual...
Read more >Is Maui dead on arrival? : r/dotnet
Since I want to be able to develop something for multiple platforms including webassembly, MAUI + Blazor seems to be the only option...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Oh, wow. This will indeed be crucial when launching a MAUI to production. Doing this without our CI/CD flow is a no-go…
I hope this gets fixed soon. Our CICD pipeline is command line only. So that means we can only build and test locally in VS.