我有一个来自公共和私人NuGet存储库的项目。这可行。但是似乎没有用的是,由于Microsoft.Bcl.Build,CI上的构建失败了,应该从Nuget Restore步骤中下载
trigger:
- master
pool:
vmImage: 'windows-2019'
demands:
- msbuild
- visualstudio
- VSTest
- DotNetFramework
variables:
solution: '**/*.sln'
buildPlatform: 'Any CPU'
buildConfiguration: 'Release'
steps:
- task: NuGetToolInstaller@0
displayName: 'Use NuGet 4.4.1'
inputs:
versionSpec: 4.4.1
- task: NuGetCommand@2
displayName: 'NuGet restore'
inputs:
restoreSolution: '$(Parameters.solution)'
feedsToUse: config
nugetConfigPath: .nuget/NuGet.Config
- task: VSBuild@1
displayName: 'Run Build on solution.'
inputs:
solution: '$(solution)'
msbuildArgs: '/p:DeployOnBuild=true /p:WebPublishMethod=Package /p:PackageAsSingleFile=true /p:SkipInvalidConfigurations=true /p:PackageLocation="$(build.artifactStagingDirectory)" /p:BclBuildImported=Ignore'
platform: '$(buildPlatform)'
configuration: '$(buildConfiguration)'
logFileVerbosity: 'diagnostic'
在上面的示例中,我尝试使用和删除/p:BclBuildImported=Ignore'
。
我正在使用的库中包含BCL ref,因此无法删除该依赖项。当我将其切换到核心时,此代码会崩溃。
当我在Visual Studio 2019 Ent中构建所有内容时,一切正常,而Pro仅拒绝在Hosted 2017平台上基于MS DevOps构建。
自首次发布以来,已尝试修复并进行评论/讨论:
This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is ..\packages\Microsoft.Bcl.Build.1.0.21\build\Microsoft.Bcl.Build.targets.
,并且Nuget下载没有显示任何错误或跳过。