aspnetcore: Blazor: Default template doesn't run on newest version
Describe the bug
When I create a new blazor project using the most recent version it builds but it doesn’t run.
To Reproduce
- Install .NET Core SDK (3.0.100-preview4-011223)
- dotnet new -i Microsoft.AspNetCore.Blazor.Templates::3.0.0-preview4-19216-03
- dotnet new blazor
- dotnet build
- dotnet run
Error Message
> dotnet run
Could not execute because the specified command or file was not found.
Possible reasons for this include:
* You misspelled a built-in dotnet command.
* You intended to execute a .NET Core program, but dotnet-C:\Users\Ricardo does not exist.
* You intended to run a global tool, but a dotnet-prefixed executable with this name could not be found on the PATH.
Additional context
> dotnet --info
.NET Core SDK (reflecting any global.json):
Version: 3.0.100-preview4-011223
Commit: 118dd862c8
Runtime Environment:
OS Name: Windows
OS Version: 10.0.17763
OS Platform: Windows
RID: win10-x64
Base Path: C:\Program Files\dotnet\sdk\3.0.100-preview4-011223\
Host (useful for support):
Version: 3.0.0-preview4-27615-11
Commit: ee54d4cbd2
.NET Core SDKs installed:
2.1.504 [C:\Program Files\dotnet\sdk]
2.1.602 [C:\Program Files\dotnet\sdk]
2.2.105 [C:\Program Files\dotnet\sdk]
3.0.100-preview4-011223 [C:\Program Files\dotnet\sdk]
.NET Core runtimes installed:
Microsoft.AspNetCore.All 2.1.8 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
Microsoft.AspNetCore.All 2.1.9 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
Microsoft.AspNetCore.All 2.2.3 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
Microsoft.AspNetCore.App 2.1.8 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 2.1.9 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 2.2.3 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 3.0.0-preview4-19216-03 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.NETCore.App 2.1.8 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 2.1.9 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 2.2.3 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 3.0.0-preview4-27615-11 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.WindowsDesktop.App 3.0.0-preview4-27613-28 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Reactions: 1
- Comments: 17 (4 by maintainers)
Commits related to this issue
- Quote the path to BlazorDevServer dll Fixes https://github.com/aspnet/AspNetCore/issues/9597 — committed to dotnet/aspnetcore by pranavkm 5 years ago
- Quote the path to BlazorDevServer dll (#9659) Fixes https://github.com/aspnet/AspNetCore/issues/9597 — committed to dotnet/aspnetcore by pranavkm 5 years ago
I fixed my version by replacing the file
C:\Users\USER_NAME\.nuget\packages\microsoft.aspnetcore.blazor.devserver\3.0.0-preview4-19216-03\build\Microsoft.AspNetCore.Blazor.DevServer.propswith the one from the fixThanks @rjmr97 for reporting this. Thanks @pranavkm and @JunTaoLuo for fixing it!
Fixed in https://github.com/aspnet/AspNetCore/pull/9659
@danroth27 I created a new account with no spaces (rribeiro) and it worked.
@ramimod Can you open a new issue so I (or others) can try to help you? I don’t think your problem is related to mine so there’s no reason to use this thread