azure devops asp.net ci-在zip中捕获工件
我有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 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
在您的msbuildargs中,您应该说您希望文物作为Zip:
In your msbuildArgs you should say that you want the artifacts as zip: