Typescript under the vs2012 problem
Typescript has a low VS2012 support level, it is recommended to upgrade to VS2013 version.
Unable to create typescript project in VS2013
VS2013 does not support typescript by default.
You need to install typescript in Tools-extensions and updates, so far (September 16, 2015) The latest version of TS for VS2013 is version 1.5, but there are some problems with the test, it is recommended to install a more stable version 1.4
Compile prompt "Typescript\1.4\1.4\tsc.exe invalid" issue
Workaround:
1, enter the directory C:\Program Files (x86) \msbuild\microsoft\visualstudio\v12. 0\typescript
2. Copy the Microsoft.TypeScript.targets file to a different path, open the edit
3, the third Tsctoolpath this line to block out, save, copy back to the original path, overwriting can (or need administrator privileges).
1<PropertyGroup>2<typescripttoolsversion condition="' $ (typescripttoolsversion) ' = = '">1.4</TypeScriptToolsVersion>3<tsctoolpath condition="' $ (tsctoolpath) ' = = '">$ (MSBUILDPROGRAMFILES32) \microsoft Sdks\typescript</tsctoolpath>4<tsctoolpath condition="' $ (typescripttoolsversion) '! = '">$ (Tsctoolpath) \</tsctoolpath>5 <!--<tsctoolpath condition= "' $ (typescripttoolsversion) '! = '" >$ (Tsctoolpath) \$ ( typescripttoolsversion) </TscToolPath>-->6<tsctoolexe condition="' $ (tsctoolexe) ' = = '">tsc.exe</TscToolExe>7<tscyieldduringtoolexecution condition="' $ (tscyieldduringtoolexecution) ' = = '">true</TscYieldDuringToolExecution>8</PropertyGroup>
See: Badpath when installing TypeScript 1.4 for Visual Studio #3493
How to adjust the compilation target version of Typescript
Workaround:
vs-"Project"-"Properties"-"typescript Generation"-"general"-"ECMAScript Version"-Select the appropriate ECMA version (currently only -3,-5,-6 supported)
Change the compilation target to ECMAScript 6 "... lib.es6.d.ts not found" error
Workaround:
1, go here to download the latest version of the definition file, address: https://github.com/Microsoft/TypeScript/blob/release-1.4/bin/lib.es6.d.ts
2, after download paste into C:\program files (x86)/microsoft sdks/typescript/1.4 folder can (or need administrator rights)
For more details, please uselib.es6.d.ts. I try to use some method of ES6? But it just go error! #1582
Cannot use new features of Typescript 1.4 (such as union type, type keyword, etc.)
Workaround:
1. Uninstall all other versions of typescript. Reinstall the version you want to use (the 1.4 stable version I'm using here)
2. Go to the cmd command line and execute tsc-v to see if the result is the version number of the current installation
3. If the version is not currently installed, restart the computer to view the version again
4, if it is still not the current version of the cmd execution set %PATH% View the current system environment variables, whether there are other typescript version of the path, if any, modify the environment variable
5, modify the environment variable method: "Computer"-"Right-click Properties"-"Advanced system Settings"-"Advanced"-"Environment variables ..."-"System Variables"-"PATH"-"edit" modify save, or may restart effective
6, if the current installation version and VS installed the ReSharper plug-in case.
7. vs-"ReSharper"-"Option"-"Code Inspection"-"Settings"-"File masks to skip"-"Add"-Enter *.ts -Save
8, the new features of TypeScript1.4 can be used normally.
9, cause the above reasons for ReSharper9 at present the highest only support TypeScript1.3 grammar, thus only temporarily shielding ReSharper provided only perceptual function.
10, if still can not use, or do not install ReSharper plug-in, please leave a message
See: Typescript 1.4:wrong Syntax highlighting in Visual Studio
Some issues with Type script in Visual Studio 2013