Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/azure/11.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
请参阅Azure DevOps和YAML管道中的构建工件_Azure_Azure Devops - Fatal编程技术网

请参阅Azure DevOps和YAML管道中的构建工件

请参阅Azure DevOps和YAML管道中的构建工件,azure,azure-devops,Azure,Azure Devops,我好像错过了什么。使用classic editor创建构建管道时,我可以在右上角看到“工件”选项卡: 在那里,我可以浏览编译器创建的内容,帮助找到发布管道的文件夹结构 现在,当我使用YAML模板(也是NET Framework)创建构建管道时,没有工件: 根据日志,已经写入了一些文件。是否有某种文件浏览器,或者我必须猜测其中哪一个与日志文件中的哪个文件夹相匹配 以下是我的摘要页面的外观: 这是YAML: # .NET Desktop # Build and run tests for .N

我好像错过了什么。使用classic editor创建构建管道时,我可以在右上角看到“工件”选项卡:

在那里,我可以浏览编译器创建的内容,帮助找到发布管道的文件夹结构

现在,当我使用YAML模板(也是NET Framework)创建构建管道时,没有工件:

根据日志,已经写入了一些文件。是否有某种文件浏览器,或者我必须猜测其中哪一个与日志文件中的哪个文件夹相匹配

以下是我的摘要页面的外观:

这是YAML:

# .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: ArchiveFiles@2
  inputs:
    rootFolderOrFile: '$(Build.BinariesDirectory)'
    includeRootFolder: false
    archiveType: 'zip'
    archiveFile: '$(Build.ArtifactStagingDirectory)/Release.zip'
    replaceExistingArchive: true

我使用的YAML主要是从Github存储库构建时生成的标准YAML。这是否会影响我是否可以看到工件?我是否应该先将Github内容复制到Azure,然后再构建它?

这似乎是
classic
YAML
的不同UI

要查看工件结构,可以转到一个构建的摘要页面()。然后将一个焦点放在正确的部分,您将看到如下所示:

单击它,您将看到它的文件夹结构()


更新:我发现了问题: GitHub构建的默认YAML文件不包括“发布”步骤。在将其添加到构建YAML的末尾之后

- task: PublishBuildArtifacts@1
  inputs:
    PathtoPublish: '$(Build.ArtifactStagingDirectory)'
    ArtifactName: 'drop'
    publishLocation: 'Container'
它实际上创建了“工件”选项卡:


谢谢大家的帮助

你能分享你的YAML吗?谢谢你的回复。不幸的是,我的摘要页面不是这样的。我在问题中添加了更多信息和屏幕截图。你能看一下吗?@JensCaasenj,不知道怎么了,我想打开你的截图时出错了。你介意再和这位网友分享一次吗?很高兴知道!您可以在2天后接受它作为答案:-)对于我们摘要页面之间的差异,这是因为我启用了多阶段构建的预览功能。你可以试试这个新功能。