Maybe it's obvious, but I checked everywhere (besides the right place) and googled it. Nothing.
相关问题
- Angular RxJS mergeMap types
- void before promise syntax
- How to know full paths to DLL's from .csproj f
- Ignore Typescript errors in Webpack-dev-server
- Importing NuGet references through a local project
相关文章
- Cannot find module 'redux' 怎么解决?
- How to show location of errors, references to memb
- How to track MongoDB requests from a console appli
- How to get a Component's own ElementRef for re
- 'Pick' only refers to a type, but is being
- Why does `keyof any` have type of `string | number
- Visual Studio Hangs on Loading UI Library
- React testing library: Test attribute / prop
If you only have TypeScript installed for Visual Studio then:
tsc -v
and hit EnterVisual Studio 2017 versions 15.3 and above bind the TypeScript version to individual projects, as this answer points out:
The
tsc -v
command run technically reads the TypeScript compiler version within the SDK directory set within the WindowsPath
variable. This doesn't necessarily reflect the latest version installed as thePath
variable is not updated with subsequent installations.The version that VS.NET uses to compile the TypeScript is what's in the project's configuration:
<TypeScriptToolsVersion>1.5</TypeScriptToolsVersion>
To help explain this more in detail I created the following post which has the specifics on the TypeScript versions installed, and which version VS.NET uses to compile the TypeScript files.
Which Version of TypeScript is Installed and Which Version is Visual Studio Using?
I also added a feature request on Microsoft Connect to make viewing and switching the TypeScript targeted version in VS.NET easier. This isn't really a TypeScript feature request as much as it is a VS.NET IDE enhancement.
Allow switching TypeScript configured version from Project Properties IDE
In the command prompt, simply type 1 of the following command then hit Enter :
tsc -v
or
tsc -version
or
tsc --version
You can run it in NuGet Package Manager Console in Visual Studio 2013.
The TypeScript team sorted this out in Visual Studio 2017 versions 15.3 and later, including the free Community edition.
How to See Which TypeScript Versions are Installed in Visual Studio
All you now need do is to go to project properties of any TypeScript Visual Studio project (right-click the project file in Solution Explorer/Properties), then go to the TypeScript Build tab on the left-hand side. This has a 'Typescript version' dropdown that shows you the version the project is using, and if you open it the dropdown shows you ALL versions of TypeScript currently installed in Visual Studio.
The actual installs are currently at
C:\Program Files (x86)\Microsoft SDKs\TypeScript
and then subfolders by version number, at least on Win10 on my computer. If you want to see the exact version (e.g. 2.8.3 rather than just 2.8) you can find the appropriatetsc.exe
in here and look at its properties (Details tab in right-click/Properties in File Explorer).How to Install Specific TypeScript Version
If you want to install a specific version of TypeScript for Visual Studio, you can download older versions from the Details->Releases section of the TypeScript SDK for Visual Studio 2017 Downloads page. You can verify that the version has been installed either with the 'Typescript version' dropdown in VS or inspecting the
C:\Program Files (x86)\Microsoft SDKs\TypeScript
folder.First, make sure you have the following address in your
Environment Variables
Path
Then open your
Command Prompt
and type the following command: