【发布时间】:2020-01-05 21:42:48
【问题描述】:
我在 OpenSUSE Tumbleweed 上并从此页面安装了 Blazor:
https://docs.microsoft.com/en-us/dotnet/core/install/(从这里下载具体的 tar.gz 文件:https://dotnet.microsoft.com/download/dotnet-core/3.0)
现在当我运行 dotnet --version 时,我得到 3.0.101。
所以我添加了这样的 Blazor 模板:
dotnet new -i Microsoft.AspNetCore.Blazor.Templates::3.1.0-preview4.19579.2
并试图创建一个这样的项目:
dotnet new blazorwasm -o BlazorDemo
cd BlazorDemo
dotnet run
项目已创建,但是 - 运行时出现此错误:
/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.
知道问题出在哪里吗?
【问题讨论】:
-
安装 dotnet 3.1 sdk 以使用 blazor wasm 3.1-preview*