gpt4 book ai didi

Azure Devops管道仅发布Web项目

转载 作者:行者123 更新时间:2023-12-03 02:18:37 27 4
gpt4 key购买 nike

以下 YAML 仅生成 Web 项目,我的存储库有 2 个 Web api 项目、1 个 blazor 和 1 个常规 asp.net core,但只有 asp.net core 和 blazor 发布到“drop”,并且 Web api 项目被忽略。我的 .sln 和文件的路径

\front-ends\webproject\webproject.csproj - regular razor project,this gets added to the drop as webproject.zip

\front-ends\blazorproject\blazorproject.csproj - blazor project, thisgets added to the drop as blazorproject.zip

\services\api1\api.csproj - not showing in the drop

\services\api2\api2.csproj - not showing in the drop

trigger:
- master

pool:
vmImage: 'windows-latest'

variables:
buildConfiguration: 'Release'

steps:
- task: UseDotNet@2
displayName: ".NET Core 6"
inputs:
version: '6.0.x'
packageType: sdk


- task: NuGetCommand@2
inputs:
command: 'restore'
restoreSolution: '**/*.sln'
feedsToUse: 'select'
vstsFeed: 'f5775ae3-da0e-4b38-82f0-ce288b91309b'
- task: DotNetCoreCLI@2
displayName: "Publish"
inputs:
command: 'publish'
arguments: '-r win-x64 --configuration $(BuildConfiguration) --output $(Build.ArtifactStagingDirectory)'

- task: PublishPipelineArtifact@1
inputs:
targetPath: '$(Build.ArtifactStagingDirectory)'
artifactName: 'drop'

最佳答案

publishWebProjects: false 添加到 `task: DotNetCoreCLI@2 (publish) 作为 default value is true

关于Azure Devops管道仅发布Web项目,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/70059241/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com