我正在尝试在Azure Pipelines中构建存储库。它可以在Visual Studio中正常构建,但是在使用Azure Pipelines(在构建计算机上运行代理)时,它将失败,并显示以下错误:
The nuget command failed with exit code(1) and error
Project MyProject is not compatible with netcoreapp2.2 (.NETCoreApp,Version=v2.2).
Project MyProject supports: netstandard2.0 (.NETStandard,Version=v2.0)
我该如何解决?
这是yaml构建脚本:
pool:
name: MyBuildServer
demands:
- msbuild
- visualstudio
steps:
- task: NuGetCommand@2
displayName: 'NuGet restore'
- task: VSBuild@1
displayName: 'Build solution **\*.sln'
- task: VSTest@2
displayName: 'Run tests'
inputs:
testSelector: 'testAssemblies'
testAssemblyVer2: |
**\*test*.dll
!**\*TestAdapter.dll
!**\obj\**
searchFolder: '$(System.DefaultWorkingDirectory)'