Upgrade TypeScript project from 0.8.0 to version

If you created a TypeScript HTML project in Visual Studio 2012 using the old version (e.g., 0.8.0 which is the first preview release) and later you upgraded TypeScript to version, you would get this compile error like this.

Error    1    The command “C:\Program Files (x86)\Microsoft SDKs\TypeScript.8.0.0\tsc” …exited with code 3.

Although it is better to just recreate your project using a newer version of TypeScript, you could just modify the csproj file by right-click at the project to unload and edit the file in text mode.



The TypeScript HTML project template in the 0.8.0 version just adds a “BeforeBuild” target and hard-coded the path to the TypeScript compiler. You should see the target element at the bottom of the file.

  <Target Name="BeforeBuild">
    <Exec Command="&quot;$(PROGRAMFILES)\Microsoft SDKs\TypeScript\\tsc&quot; @(TypeScriptCompile ->'&quot;%(fullpath)&quot;', ' ')" />

So what you need to do is to change “” to “” and everything should work.

However, I would recommend you to recreate your project using the new version, so you could also debug your TypeScript code as well as getting rid of hard-coded version in the project file altogether (the project file generated by is quite different from what 0.8.0 generates).