Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Blazor 0.8.0 standalone project that was generated by "dotnet new blazor" command could not launch. #7304

Closed
jsakamoto opened this issue Feb 6, 2019 · 3 comments
Assignees
Labels
area-mvc Includes: MVC, Actions and Controllers, Localization, CORS, most templates question

Comments

@jsakamoto
Copy link

jsakamoto commented Feb 6, 2019

Describe the bug

Blazor 0.8.0 standalone project that was generated by dotnet new blazor command could not launch.

To Reproduce

Steps to reproduce the behavior:

  1. Install .NET Core SDK ver.3.0.0-preview-19075-0444 from here.
  2. Install Visual Studio 2019 Preview 2.
  3. Install Blazor 0.8.0 template by dotnet new -i Microsoft.AspNetCore.Blazor.Templates::0.8.0-preview-19104-04
  4. Create Blazor 0.8.0 standalone project by dotnet new blazor.
  5. Restore and build it by dotnet build. (this will be success.)
  6. Run it by dotnet run
  7. The error message (see bellow) is shown, and it could not launch.
The specified framework 'Microsoft.AspNetCore.App', version '3.0.0-preview-19104-06' was not found.

Expected behavior

dotnet run launch blazor server successfully.

Screenshots

image

Additional context

The hosted version of Blazor 0.8.0 that was generated by dotnet new blazorhosted CLI works fine.

I could not find the version 3.0.0-preview-19104-06 of .NET Core SDK or Runtime in my internet searching.

My workaround

I rewrited "%HOME%.nuget\packages\microsoft.aspnetcore.blazor.cli\0.8.0-preview-19104-06\lib\netcoreapp3.0\dotnet-blazor.runtimeconfig.json" to use v.19075-0444 instead of v.19104-06.

image

After that, "dotnet run" works fine.

@Eilon Eilon added the area-mvc Includes: MVC, Actions and Controllers, Localization, CORS, most templates label Feb 6, 2019
@jsakamoto
Copy link
Author

jsakamoto commented Feb 7, 2019

Additional Information

The Blazor standalone project that was generated by Visual Studio 2019 Preview 2.x worked fine.

The difference of theses projects was bellow:

<!-- from "dotnet new blazor"-->
<DotNetCliToolReference Include="Microsoft.AspNetCore.Blazor.Cli" Version="0.8.0-preview-19104-06" />
<!-- from VS2019-->
<DotNetCliToolReference Include="Microsoft.AspNetCore.Blazor.Cli" Version="0.8.0-preview-19104-04" />

I tried uninstall the project template with dotnet new -u Microsoft.AspNetCore.Blazor.Templates -Version command, and reinstall it with dotnet new -i Microsoft.AspNetCore.Blazor.Templates::0.8.0-preview-19104-04 command.

After that, dotnet new blazor generate the csproj as bellow:

<!-- from "dotnet new blazor" after reinstall project template -->
<DotNetCliToolReference Include="Microsoft.AspNetCore.Blazor.Cli" Version="0.8.0-preview-19104-04" />

Of course, Version 0.8.0-preview-19104-04 CLI works fine.

I'm not sure about why my first installation of Blazor project template for dotnet CLI was configured for using invalid version"19104-06".

@mkArtakMSFT
Copy link
Member

Thanks for contacting us, @jsakamoto.
Glad you've found the cause of this and managed to fix it.
@danroth27, what this could be caused by?

@danroth27
Copy link
Member

@jsakamoto I suspect when you installed the Blazor templates initially you somehow picked up a version of the templates package from one of our MyGet feeds with dev builds.

Since you've resolved your own issue I'm going to go ahead and close this.

@dotnet dotnet locked as resolved and limited conversation to collaborators Dec 3, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-mvc Includes: MVC, Actions and Controllers, Localization, CORS, most templates question
Projects
None yet
Development

No branches or pull requests

4 participants