azure devops asp.net ci-在zip中捕获工件

发布于 2025-01-31 20:15:05 字数 1189 浏览 4 评论 0原文

我有ASP.NET CI,它出版了.zip文物。

当我下载.zip伪像时,我必须浏览许多文件夹才能看到文件。 我在构建解决方案和许多其他解决方案时使用了默认参数,但没有结果。 有没有办法发布.zip,所以当我下载它时,我已经看到了文件? 在.NET核心中,该问题不会发生,但是在ASP.NET中确实如此。

我使用了模板而不是yaml文件。

灵魂构建:

steps:
- task: VSBuild@1
  displayName: 'Build solution'
  inputs:
    solution: '$(Parameters.solution)'
    msbuildArgs: '/p:DeployOnBuild=true /p:WebPublishMethod=Package /p:PackageAsSingleFile=true /p:SkipInvalidConfigurations=true /p:PackageLocation="$(build.artifactstagingdirectory)\\"'
    platform: '$(BuildPlatform)'
    configuration: '$(BuildConfiguration)'

发布符号

steps:
- task: PublishSymbols@2
  displayName: 'Publish symbols path'
  inputs:
    SearchPattern: '**\bin\**\*.pdb'
    PublishSymbols: false
  continueOnError: true

发布文物

steps:
- task: PublishBuildArtifacts@1
  displayName: 'Publish Artifact WEB: to drop'
  inputs:
    PathtoPublish: '$(build.artifactstagingdirectory)\HRSoft.WebClient.zip'
    ArtifactName: '$(Parameters.ArtifactName)'
  condition: succeededOrFailed()

I have Asp.net CI, which publishes .zip artifacts.

When I download the .zip artifact, I have to go through many folders to be able to see the files.
I used the default arguments when building solution and many other ones, but no result.
Is there a way to publish the .zip so, that when I download it I see the files already?
In .net core that issue doesn't occur, but in asp.net does.

I used templated not yaml files.

Soulution build:

steps:
- task: VSBuild@1
  displayName: 'Build solution'
  inputs:
    solution: '$(Parameters.solution)'
    msbuildArgs: '/p:DeployOnBuild=true /p:WebPublishMethod=Package /p:PackageAsSingleFile=true /p:SkipInvalidConfigurations=true /p:PackageLocation="$(build.artifactstagingdirectory)\\"'
    platform: '$(BuildPlatform)'
    configuration: '$(BuildConfiguration)'

Publish Symbols

steps:
- task: PublishSymbols@2
  displayName: 'Publish symbols path'
  inputs:
    SearchPattern: '**\bin\**\*.pdb'
    PublishSymbols: false
  continueOnError: true

Publish artifact

steps:
- task: PublishBuildArtifacts@1
  displayName: 'Publish Artifact WEB: to drop'
  inputs:
    PathtoPublish: '$(build.artifactstagingdirectory)\HRSoft.WebClient.zip'
    ArtifactName: '$(Parameters.ArtifactName)'
  condition: succeededOrFailed()

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

余罪 2025-02-07 20:15:06

在您的msbuildargs中,您应该说您希望文物作为Zip:

/p:DesktopBuildPackageLocation="$(build.artifactstagingdirectory)\WebApp.zip" or /p:p:PackageLocation="$(build.artifactstagingdirectory)\WebApp.zip"

In your msbuildArgs you should say that you want the artifacts as zip:

/p:DesktopBuildPackageLocation="$(build.artifactstagingdirectory)\WebApp.zip" or /p:p:PackageLocation="$(build.artifactstagingdirectory)\WebApp.zip"
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文