You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Azure DevOps发布Zip包未含隐藏目录,是否存在排除隐藏文件夹选项?

Azure DevOps Archive Task: Including Hidden Directories like .well-known

Great question! Let’s clear this up for you—Azure DevOps’ built-in Archive Files task does have a configuration option related to hidden files/folders, and the behavior you’re seeing is actually the default setting at work.

Here’s what you need to know:

  • The task automatically excludes hidden files and folders by default via a setting called excludeHiddenFiles, which is set to true out of the box. That’s exactly why your /wwwroot/.well-known directory isn’t showing up in the zip.
  • Yes, there absolutely is a configurable option to control this (and in your case, you’ll want to disable the exclusion to include the hidden directory).

How to adjust the setting:

1. Using the Visual Pipeline Editor

  • Locate your Archive Files task in the pipeline editor.
  • Expand the Advanced section (click the "Show advanced settings" link if it’s collapsed).
  • Look for the checkbox labeled Exclude hidden files—uncheck this box to allow hidden directories/files to be included in the zip.

2. Using YAML

If you’re defining your pipeline with YAML, add the excludeHiddenFiles: false parameter to your ArchiveFiles@2 task. Here’s a quick example:

- task: ArchiveFiles@2
  inputs:
    rootFolderOrFile: '$(Build.ArtifactStagingDirectory)/wwwroot'
    includeRootFolder: false
    archiveType: 'zip'
    archiveFile: '$(Build.ArtifactStagingDirectory)/$(Build.BuildId).zip'
    replaceExistingArchive: true
    excludeHiddenFiles: false  # This disables the default exclusion of hidden content

Once you make this change, re-run your pipeline, and the .well-known directory should be included in your zip package as expected. If there are nested hidden files inside that directory, they’ll also be included with this setting.

内容的提问来源于stack exchange,提问作者Dreeco

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.08.04 17:10:49