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.
None
0 Points
2 Posts
Blazor on Linux: Error Could not load file or assembly System.Runtime
Jan 04, 2020 10:59 PM|pesho_h_k|LINK
I am on OpenSUSE Tumbleweed and installed Blazor from this page:
https://docs.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:
And tried to create a project like this:
The project got created, however - upon running I get this error:
Any idea what could the problem be?
Participant
1968 Points
1026 Posts
MVP
Re: Blazor on Linux: Error Could not load file or assembly System.Runtime
Jan 05, 2020 12:39 PM|maherjendoubi|LINK
Hi,
Would you please share your csproj file?
Best regards,
Maher
Blog : https://maherjendoubi.io
None
0 Points
2 Posts
Re: Blazor on Linux: Error Could not load file or assembly System.Runtime
Jan 05, 2020 01:49 PM|pesho_h_k|LINK
Thanks, maherjendoubi, for taking a look into this.
However, apparently I was using .NET 3.0. and was trying to run template for 3.1.
So - I deleted the
dotnet
folder and installed again the correct version (3.1.) of .NET:And now I'm able to run Blazor on an unsupported Linux distro :)