Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Create a new TypeScript project in Visual Studio

How do I start writing TypeScript projects in Visual Studio? There's no option for it when I create a new project. I have Visual Studio 2012 installed along with the TypeScript add on

like image 891
LordZardeck Avatar asked Oct 02 '12 05:10

LordZardeck


People also ask

How do you add a TypeScript to a project?

You can use npm to install TypeScript globally, this means that you can use the tsc command anywhere in your terminal. To do this, run npm install -g typescript . This will install the latest version (currently 4.7). An alternative is to use npx when you have to run tsc for one-off occasions.


1 Answers

I just found the solution: Manual installation of the VS-Extension.

In some way, the VS-Extension is not getting installed. You can do it manually. There is a .vsix file located in C:\Program Files (x86)\Microsoft SDKs\TypeScript\0.8.0.0 called TypeScriptLanguageService.vsix. Try to run this file. It should install the TypeScript extension.

If you are running an x86-based system, try to look at C:\Program Files\Microsoft SDKs\TypeScript\0.8.0.0.

Worked for me. Now I can create TypeScript projects and it is listed in the Visual Studio extension list.

Note that the newer versions of TypeScript dropped the folder 0.8.0.0. You may find the .vsix file in C:\Program Files (x86)\Microsoft SDKs\TypeScript.

like image 181
nikeee Avatar answered Sep 24 '22 01:09

nikeee