Visual Studio Team Services Release/Deploy fails - “No package found with specified pattern”

前端 未结 5 1232
逝去的感伤
逝去的感伤 2021-02-12 13:47

I\'m trying to implement continuous integration and continuous deployment to my DEV Azure App Service. I\'m using the hosted agent on Visual Studio Team Services. The \"Deploy W

5条回答
  •  执念已碎
    2021-02-12 14:10

    if you are using the default azure app service deployment task, add this to end of YAML file:

    - task: DotNetCoreCLI@2
      displayName: 'dotnet publish $(buildConfiguration)'
      inputs:
        command: publish
        publishWebProjects: True
        arguments: '--configuration $(buildConfiguration) --output $(Build.ArtifactStagingDirectory)'
        zipAfterPublish: True
    
    - task: PublishBuildArtifacts@1
      displayName: 'publish artifacts'
    

    I had the same issue and this worked for me:

    # ASP.NET Core
    # Build and test ASP.NET Core projects targeting .NET Core.
    # Add steps that run tests, create a NuGet package, deploy, and more:
    # https://docs.microsoft.com/azure/devops/pipelines/languages/dotnet-core
    
    trigger:
    - master
    
    pool:
      vmImage: 'ubuntu-latest'
    
    variables:
      buildConfiguration: 'Release'
    
    steps:
    - script: dotnet build --configuration $(buildConfiguration)
      displayName: 'dotnet build $(buildConfiguration)'
    
    - task: DotNetCoreCLI@2
      displayName: 'dotnet publish $(buildConfiguration)'
      inputs:
        command: publish
        publishWebProjects: True
        arguments: '--configuration $(buildConfiguration) --output $(Build.ArtifactStagingDirectory)'
        zipAfterPublish: True
    
    - task: PublishBuildArtifacts@1
      displayName: 'publish artifacts'
    

提交回复
热议问题