title: How can I know from a .csproj file if nodejs is installed on the computer?
body: <p>I am building *.less files using a custom target in *.csproj and the original compiler that requires nodejs. Node isn't available on all development machines, so I need to be able to switch off the target if node isn't present on a computer. How can I do that?</p>
  
  <pre><code>&lt;Target Name="CompileLessCss" BeforeTargets="Compile"
          Inputs="@(LessCssRoot);@(LessCssInput)" Outputs="@(LessCssOutput)"&gt;
      &lt;Exec Command="node &amp;quot;$(SolutionDir)/Tools/less.js/bin/lessc&amp;quot; --verbose @(LessCssRoot) @(LessCssOutput)" ConsoleToMSBuild="true"&gt;
        &lt;Output TaskParameter="ConsoleOutput" PropertyName="OutputOfExec" /&gt;
      &lt;/Exec&gt;
  &lt;/Target&gt;
  </code></pre>