Skip to content

Latest commit

 

History

History
46 lines (41 loc) · 1.27 KB

DotNetCoreCLI.md

File metadata and controls

46 lines (41 loc) · 1.27 KB

Azure Pipelines

.Net Core CLI

  • Classic

.Net Core CLI (restore) .Net Core CLI (build) .Net Core CLI (test)

  • YAML
steps:
- task: DotNetCoreCLI@2
  displayName: Restoring .Net packages
  inputs:
    command: 'restore'
- task: DotNetCoreCLI@2
  displayName: Building code
  inputs:
    command: 'build'
    projects: '**/*.csproj'
    arguments: '--configuration $(buildConfiguration)'
- task: DotNetCoreCLI@2
  displayName: Running unit tests
  inputs:
    command: test
    projects: '**/*Tests/*.csproj'
    arguments: '--configuration $(buildConfiguration)'

GitHub Actions

.Net Core SDK

    # Install .Net Core SDK: https://github.com/actions/setup-dotnet
    - name: Setup .NET Core
      uses: actions/setup-dotnet@v1
      with:
        dotnet-version: 3.1.101
    - name: Install dependencies
      run: dotnet restore
    - name: Build
      run: dotnet build --configuration Release --no-restore
    - name: Test
      run: dotnet test --no-restore --verbosity normal