我正在创建我的第一个管道来构建 .NET 桌面应用程序。我已将所需的任务添加到我的 YML 文件中,但出现以下错误,关于可能缺少或未找到的程序集。
错误消息:“找不到类型或命名空间名称‘AxAcroPDFLibre’...”
This is the complete code of my YML file:
# .NET Desktop
# Build and run tests for .NET Desktop or Windows classic desktop solutions.
# Add steps that publish symbols, save build artifacts, and more:
# https://docs.microsoft.com/azure/devops/pipelines/apps/windows/dot-net
trigger:
- master
pool: vmImage: 'windows-latest'
variables: solution: '**/*.sln' buildPlatform: 'Any CPU' buildConfiguration: 'Release'
steps:
- task: NuGetToolInstaller@1
- task: NuGetCommand@2 inputs:
restoreSolution: '$(solution)'
- task: VSBuild@1 inputs:
solution: '$(solution)'
platform: '$(buildPlatform)'
configuration: '$(buildConfiguration)'
- task: VSTest@2 inputs:
platform: '$(buildPlatform)'
configuration: '$(buildConfiguration)'
- task: CopyFiles@2 displayName: 'Copy Files to: $(build.artifactstagingdirectory)' inputs:
SourceFolder: '$(system.defaultworkingdirectory)'
Contents: '**/bin/**'
TargetFolder: '$(build.artifactstagingdirectory)' condition: succeededOrFailed()
- task: PublishBuildArtifacts@1 displayName: 'Publish Artifact: drop' inputs:
PathtoPublish: '$(build.artifactstagingdirectory)' condition: succeededOrFailed() I found this similar question here on StackOverflow, but I have checked my nugget package command and I have it in the build file.
在该过程结束时,该作业失败。
自从我在 Azure DevOps Pipelines 上记录自己以来,目前我尝试过的所有方法都如此。如果您有任何建议,我将不胜感激。
答案1
这与您的管道无关,它无法构建您的解决方案,因此缺少依赖项或构建代理上不存在的包。