我整个周末都在为此苦苦挣扎。
我无法获得Net Core 3 SDK Preview 9的成功构建(2019年9月4日发布)。
我已经建立了专门用于:
构建阶段(4)出现以下错误:
错误:无法找到.NET Core SDK。检查它是否已安装,以及global.json中指定的版本(如果有)是否与安装的版本匹配。
错误MSB4236:找不到指定的SDK'Microsoft.NET.Sdk.Web'。
在实施global.json步骤2 之前,我最初在Nuget恢复阶段(3)遇到相同的错误,因此我知道global.json正确引用了。
管道YAML:
pool:
name: Azure Pipelines
demands:
- msbuild
- visualstudio
steps:
- task: UseDotNet@2
displayName: 'Use .Net Core sdk 3.0.100-preview9-014004'
inputs:
version: '3.0.100-preview9-014004'
includePreviewVersions: true
- powershell: |
$globaljson = '{"sdk": {"version": "3.0.100-preview9-014004"}}';
$globaljson | out-file './test.app/global.json' -Encoding UTF8
displayName: 'Global Json'
- task: NuGetToolInstaller@1
displayName: 'Use NuGet 5.x'
inputs:
versionSpec: 5.x
checkLatest: true …Run Code Online (Sandbox Code Playgroud)