VS2015: Adding "watch": true to tsconfig.json causing JsErrorScriptException (0x30001)
<p>I have created a dummy basic project in <strong>VS2015 Community Update 3</strong>, Version 14.0.25424.00.
(Using this great tutorial:  <a href="http://www.talkingdotnet.com/cascading-dropdown-list-aspnet-core-web-api-angularjs-2/" rel="nofollow">aspnet-core-web-api-angularjs-2</a> ).</p>

<p>This angular-2 project has some .ts files.</p>

<p>The problem: </p>

<p>Instead of being transpiled ("compiled") to .js files <strong>every time a file is being saved</strong>, the .ts files being transpiled <strong>once and only at BUILD</strong> time of the SERVER-SIDE  project.
(clicking F5 from visual studio).</p>

<p>I google it and found out that I should add "watch": true
to the tsconfig.json file:</p>

<pre><code> {
  "compilerOptions": {
    "noImplicitAny": false,
    "noEmitOnError": true,
    "removeComments": false,
    "sourceMap": true,
    "target": "es5",
    "emitDecoratorMetadata": true,
    "experimentalDecorators": true,
    "module": "system",
    "moduleResolution": "node",
    "watch": true
  },
  "exclude": [
    "node_modules",
    "wwwroot/lib"
  ]
}
</code></pre>

<p>However, now I am getting an error at BUILD time:
Error       'JsErrorScriptException (0x30001)'. ASPNETCoreAngular2Demo  C:\Visual Studio 2015\Projects\ASPNETCoreAngular2Demo\src\ASPNETCoreAngular2Demo\Unknown output 1</p>

<p>According to <a href="https://github.com/Microsoft/TypeScript/issues/7362" rel="nofollow">this</a> post, the solution in VS2015 update 2 is to add to the tsconfig file:</p>

<pre><code>"compileOnSave": true
</code></pre>

<p>However, this didn't work for me in my update 3 version.</p>

<p>From the cmd I run the following:</p>

<blockquote>
  <p><code>&gt;tsc -v
   Version 1.0.3.0</code></p>
</blockquote>

<p>Which I think is pretty old but I don't know how to update it, because running:</p>

<pre><code>&gt;npm install -g typescript@* --save
</code></pre>

<p>didn't change the current version.</p>

<p>What do you suggest?
I am desperate..</p>

<p>TNX,</p>