Azure Pinelines Dotnet Build Script

azure-pipelines.yml

# ASP.NET Core (.NET Framework)
# Build and test ASP.NET Core projects targeting the full .NET Framework.
# Add steps that publish symbols, save build artifacts, and more:
# https://docs.microsoft.com/azure/devops/pipelines/languages/dotnet-core

trigger:
- dev

pool: 'Default'

variables:
  solution: 'TestApp.sln'
  buildPlatform: 'x64'
  buildConfiguration: 'Debug'

steps:

- task: NuGetCommand@2
  displayName: 'Restore package'
  inputs:
    command: 'restore'
    restoreSolution: '${{variables.solution}}'
    feedsToUse: 'Config'
    nugetConfigPath: '$(Build.SourcesDirectory)\nuget.config'

- task: DotNetCoreCLI@2
  displayName: 'Build Binary'
  inputs:
    command: 'build'
    projects: |
            TestApp/aspnet-core/src/TestApp.HttpApi.Host/TestApp.HttpApi.Host.csproj
    arguments: '--configuration $(buildConfiguration) '

- task: CopyFiles@2
  inputs:
    targetFolder: '$(Build.ArtifactStagingDirectory)'    
- task: PublishBuildArtifacts@1

  

posted on 2020-12-31 23:56  白马酒凉  阅读(66)  评论(0编辑  收藏  举报

导航