title: Jenkins: no tool named MSBuild found
body: <p>Setting up a Pipeline build in Jenkins (Jenkins 2.6), copying the sample script for a git-based build gives: "no tool named MSBuild found". I have set MSBuild Tool in <code>Manage Jenkins -&gt; Global Tool Configuration</code>. I am running pipeline on the slave node.
  <br/><br/>In Slave configuration, I have set MSBuild tool path in <code>Node Properties -&gt; Tool Locations</code>. 
  <br/> While build process it is not able to get MSBuild tool path, if i run same source without pipeline (without using Jenkinsfile) it works fine. 
  <br/><br/><br/>Please see Jenkinsfile Syntax</p>
  
  <pre><code>pipeline {
      agent { label 'win-slave-node' }
      stages {
             stage('build') {
             steps {
  
             bat "\"${tool 'MSBuild'}\" SimpleWindowsProject.sln /t:Rebuild /p:Configuration=Release"
             }
      }
     }
  }
  </code></pre>
  
  <p><br/><br/> I have also tried to change environment variable for windows slave it not refreshed.
  <br/><br/><br/><strong>NOTE:  I have installed MS Build tool for on slave node</strong></p>