title: Make VS2015 use angular-cli ng at build time in a .NET project
body: <p>I open a clearer question. </p>
  
  <p>How is it possible on precompile script in a .NET project, to make VS2015 build the Angular2-cli project with angular-cli tools (<code>ng</code>) installed globally via npm.</p>
  
  <p>Steps:
   - <code>npm install -g angular-cli</code>
   - In our .NET project under VS2015, on F5 (build) we need <code>ng build</code> to be called.</p>
  
  <p>We tried:</p>
  
  <pre><code>"precompile": [ "npm install -g angular-cli", "npm install", "ng build --prod" ],
  </code></pre>
  
  <p>But I encounter errors on VS2015 console. Full logs: <a href="http://pastebin.com/RMiU6eMe" rel="nofollow noreferrer">http://pastebin.com/RMiU6eMe</a></p>
  
  <p>VS2015 doesn't seem to manage to use globally installed <code>ng</code> command. </p>
  
  <p>I tried in our script to call directly the <code>ng</code> tool installed locally as declared in our package.json via npm install:</p>
  
  <pre><code>"precompile": [ "npm install", "node_modules/angular-cli/bin/ng build --prod" ],
  </code></pre>
  
  <p>But VS2015 answers as below:</p>
  
  <blockquote>
    <p>C:\Program Files
    (x86)\MSBuild\Microsoft\VisualStudio\v14.0\DotNet\Microsoft.DotNet.Common.Targets(262,5):
    error : The specified executable is not a valid application for this
    OS platform.</p>
  </blockquote>
  
  <p>I don't want to have to run separately from command line <code>ng build</code> (which works by the way...) BEFORE being able to build on VS2015.</p>