0

I am on OpenSUSE Tumbleweed and installed Blazor from this page:

https://learn.microsoft.com/en-us/dotnet/core/install/ (Downloaded the specific tar.gz files from here: https://dotnet.microsoft.com/download/dotnet-core/3.0)

And now when I run dotnet --version I get 3.0.101.

So I added the Blazor template like this:

dotnet new -i Microsoft.AspNetCore.Blazor.Templates::3.1.0-preview4.19579.2

And tried to create a project like this:

dotnet new blazorwasm -o BlazorDemo
cd BlazorDemo
dotnet run

The project got created, however - upon running I get this error:

/home/petar/.nuget/packages/microsoft.aspnetcore.blazor.build/3.1.0-preview4.19579.2/targets/Blazor.MonoRuntime.targets(151,5): error MSB4062: The "BlazorCreateRootDescriptorFile" task could not be loaded from the assembly /home/petar/.nuget/packages/microsoft.aspnetcore.blazor.build/3.1.0-preview4.19579.2/targets/../tools/netcoreapp/Microsoft.AspNetCore.Blazor.Build.Tasks.dll. Could not load file or assembly 'System.Runtime, Version=4.2.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. The system cannot find the file specified. [/home/petar/Blazor/BlazorDemo/BlazorDemo.csproj]
/home/petar/.nuget/packages/microsoft.aspnetcore.blazor.build/3.1.0-preview4.19579.2/targets/Blazor.MonoRuntime.targets(151,5): error MSB4062:  Confirm that the <UsingTask> declaration is correct, that the assembly and all its dependencies are available, and that the task contains a public class that implements Microsoft.Build.Framework.ITask. [/home/petar/Blazor/BlazorDemo/BlazorDemo.csproj]

The build failed. Fix the build errors and run again.

Any idea what could the problem be?

1
  • 2
    install dotnet 3.1 sdk to use blazor wasm 3.1-preview* Commented Jan 5, 2020 at 10:24

1 Answer 1

1

As Agua mentioned - I was using the .NET 3.0. but I was using the template for 3.1.

So - I deleted the dotnet folder and installed again the correct version:

  1. This tutorial - https://learn.microsoft.com/en-us/dotnet/core/install/sdk?pivots=os-linux
  2. Download page - https://learn.microsoft.com/en-us/dotnet/core/install/sdk?pivots=os-linux#all-net-core-downloads

And now I'm able to run Blazor on an unsupported Linux distro :)

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.