我有一个用于 WebAssembly Blazor 应用程序的现有 Azure CI 管道,可与 .NET Core 3.1 配合使用。
我升级了应用程序以使用 .NET 5 RC,但管道不再工作。
根据建议,我删除了 NuGet 任务,并插入了两个新任务:
- task: UseDotNet@2
displayName: 'Use .NET Core sdk 5.0.100-rc.1.20452.10'
inputs:
version: '5.0.100-rc.1.20452.10'
includePreviewVersions: true
- task: DotNetCoreCLI@2
displayName: 'dotnet restore'
inputs:
command: restore
projects: '**/*.csproj'
Run Code Online (Sandbox Code Playgroud)
那个工作。
但是构建任务失败了:
...
ValidateSolutionConfiguration:
Building solution configuration "release|any cpu".
It was not possible to find any installed .NET Core SDKs
Did you mean to run .NET Core SDK commands? Install a .NET Core SDK from:
https://aka.ms/dotnet-download
##[error]Test1\Server\Server.csproj(0,0): …Run Code Online (Sandbox Code Playgroud)