Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to install Typescript 2.2 in Visual Studio 2017 v15.4.3

I tried this hack: https://github.com/Microsoft/TypeScript/issues/14529 but got other terrible errors so I don't think it worked.

And 2.2 is not available under options here: https://www.microsoft.com/en-us/download/details.aspx?id=55258

"Install-Package Microsoft.TypeScript.MSBuild -Version 2.2.2" did not work either, made the 2.2 show up on the dropdown but only as unavailable. https://www.nuget.org/packages/Microsoft.TypeScript.MSBuild/2.2.2

unavailable

like image 945
azulBonnet Avatar asked Nov 10 '17 19:11

azulBonnet


People also ask

How do I install TypeScript 2?

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.8). An alternative is to use npx when you have to run tsc for one-off occasions.

How do I know if TypeScript is installed in Visual Studio 2017?

TypeScript is installed through the NPM package manager. The -g means it's installed on your system globally so that the TypeScript compiler can be used in any of your projects. Test that the TypeScript is installed correctly by typing tsc -v into your terminal or command prompt.


2 Answers

Run the visual studio installer and modify your visual studio install. Under individual components you will see the versions of typescript available for install.

enter image description here

like image 60
Ken Tucker Avatar answered Nov 15 '22 10:11

Ken Tucker


In my case, I am using VS 2019 and @ken-tucker answer did not worked for me. The Typescript version that I needed (3.6.2) did not appeared in the "Individual components" Tab.

I needed to install from here and restart Visual Studio.

like image 43
VGs Avatar answered Nov 15 '22 10:11

VGs