Azure DevOps pipeline build locally with YAML : <p>how can I simulate the build process of Azure Devops pipeline on the local machine before pushing it to branch to test the possible errors. </p>

<p>the solution gets build locally correct with no errors and warnings. also from the VS command line <code>MSBuild</code> builds the solution with no errors but on some push tries the pipeline build throws many errors mostly related to <code>preprocessor defenition</code> and <code>precompiled header</code>. </p>

<p>I wanted to know how can test the same process locally on my machine without pushing to repo.</p>

<pre><code>azure-pipelines.yml
-------------------
pool:
  vmImage: 'vs2017-win2016'

steps:
- task: MSBuild@1
  displayName: 'Build solution'
  inputs:
    platform: 'Win32'
    configuration: 'release'
    solution: 'mysolution.sln'
- task: VSTest@2
  displayName: 'Run Test'
  inputs:
    platform: 'Win32'
    Configuration: 'release'
    testAssemblyVer2: |
     **\*.Test.dll
     !**\*TestAdapter.dll
     !**\obj\**
    runSettingsFile: project.Test/test.runsettings
    codeCoverageEnabled: true 
</code></pre>
