How to get TypeScript working with Visual Studio 2013

后端 未结 4 1121
清酒与你
清酒与你 2020-12-28 14:10

I have downloaded Typescript plugin for Visual Studio, installed it and restarted my PC. I have also installed both VS 2013 Express for Web and VS 2013 Ultimate Preview but

4条回答
  •  一生所求
    2020-12-28 14:53

    I found a question on here with an answer that almost worked. But after changing some things around I was able to get this working. These steps slightly deviate from the original, which can be found here.

    1. Close Visual Studio.
    2. Install Visual C++ Redistributable for Visual Studio 2012 Update 3 x86 version (even if running on an x64 platform; tsc.exe is an x86 application).
    3. Download TypeScript for Visual Studio 2012 version 0.9.0.1
    4. Uncompress/Extract the MSI file to a temporary location using https://code.google.com/p/lessmsi/
    5. Copy the directory SourceDir\Microsoft SDKs\TypeScript to %ProgramFiles(x86)%\Microsoft SDKs
    6. Copy the directory SourceDir\VS11_EXTENSIONS_DIR\TypeScript to %ProgramFiles(x86)%\Microsoft Visual Studio 12.0\Common7\IDE\Extensions\Microsoft
    7. Copy the the two files in the SourceDir\VS11 folder (file.ts, newtypescriptfileitems.vsdir) to %ProgramFiles(x86)%\\Microsoft Visual Studio 12.0\Common7\IDE\NewFileItems
    8. Copy the folder SourceDir\MSBuild\Microsoft\VisualStudio\v12.0\TypeScript to %ProgramFiles(x86)%\MSBuild\Microsoft\VisualStudio\v12.0
    9. Modify your path environment variable to include %ProgramFiles(x86)%\Microsoft SDKs\TypeScript
    10. Start visual studio.

    These exact steps led to me being able to work with full TypeScript support in Visual Studio 2013 Preview and Visual Studio 2013 Express for Web. A big thanks goes to the dude who posted this answer.

提交回复
热议问题