queue: Hosted VS2017

steps:

- checkout: self
  clean: true

- task: MSBuild@1
  displayName: Restore
  inputs:
    solution: src/Moq.sln
    msbuildArguments: /t:Restore /p:Configuration=Release /m

- task: MSBuild@1
  displayName: Version
  inputs:
    solution: src/Moq/Moq.Package/Moq.Package.csproj
    msbuildArguments: /t:Version /bl:"$(Build.ArtifactStagingDirectory)\version.binlog"

- task: MSBuild@1
  displayName: Build
  inputs:
    solution: src/Moq.sln
    msbuildArguments: /bl:"$(Build.ArtifactStagingDirectory)\build.binlog" /p:PackOnBuild=true /p:PackageOutputPath=$(Build.ArtifactStagingDirectory) /p:Configuration=Release

- task: VSTest@2
  displayName: Test
  inputs:
    testAssemblyVer2: src\*\*\bin\*\*.Tests.dll
    runInParallel: 'true'
    codeCoverageEnabled: 'true'
    publishRunAttachments: 'true'
    rerunFailedTests: true
    
- task: PublishBuildArtifacts@1
  displayName: Publish Artifact
  inputs:
    PathtoPublish: $(Build.ArtifactStagingDirectory)
    ArtifactName: out
    ArtifactType: Container
  condition: always()
queue: Hosted VS2017

steps:

- checkout: self
  clean: true

- task: MSBuild@1
  displayName: Restore
  inputs:
    solution: src/Moq.sln
    msbuildArguments: /t:Restore /p:Configuration=Release /m

- task: MSBuild@1
  displayName: Version
  inputs:
    solution: src/Moq/Moq.Package/Moq.Package.csproj
    msbuildArguments: /t:Version /bl:"$(Build.ArtifactStagingDirectory)\version.binlog"

- task: MSBuild@1
  displayName: Build
  inputs:
    solution: src/Moq.sln
    msbuildArguments: /bl:"$(Build.ArtifactStagingDirectory)\build.binlog" /p:PackOnBuild=true /p:PackageOutputPath=$(Build.ArtifactStagingDirectory) /p:Configuration=Release

- task: VSTest@2
  displayName: Test
  inputs:
    testAssemblyVer2: src\*\*\bin\*\*.Tests.dll
    runInParallel: 'true'
    codeCoverageEnabled: 'true'
    publishRunAttachments: 'true'
    diagnosticsEnabled: false
    rerunFailedTests: true
    
- task: PublishBuildArtifacts@1
  displayName: Publish Artifact
  inputs:
    PathtoPublish: $(Build.ArtifactStagingDirectory)
    ArtifactName: out
    ArtifactType: Container
  condition: always()
Disable advanced diagnostics to avoid build warning
Disable advanced diagnostics to avoid build warning

With the setting in its default enabled state, we get the
following warning:

    ##[warning]Advanced diagnostics data collection requires test platform version 15.9 or higher.
