Visual Studio에서 설치된 TypeScript 버전을 어디에서 찾을 수 있습니까?
어쩌면 그것은 분명하지만, 나는 모든 곳을 (바른 곳을 제외하고) 확인하고 봤습니다. 아무것도.
Visual Studio 용 TypeScript 만 설치 한 경우 :
- Visual Studio 명령 프롬프트를 시작하십시오.
- 입력
tsc -v
하고 Enter를 누르십시오
비주얼 스튜디오 2017 버전 15.3 이상 바인드와 같은 개별 프로젝트에 타이프 라이터 버전, 밖으로이 응답 포인트 :
- 솔루션 탐색기에서 프로젝트 노드를 마우스 오른쪽 버튼으로 클릭하십시오.
- 속성을 클릭하십시오
- TypeScript Build 탭으로 이동
질문을받은 지 2 년이 지난 후에도 Visual Studio 명령 프롬프트를 사용해도 여전히 올바른 답변을 얻지 못했습니다. 그러나 일반적인 Help | About 창이 요즘 작동하는 것 같습니다.
업데이트 (2017 년 6 월) :
VS 2013에는이 정보가 표시되지 않습니다. (나중에 참고 : VS 2017 Enterprise 에디션에도이 정보가 표시되지 않습니다).
VS는 Microsoft Build Engine (MSBuild)을 사용하여 Typescript 파일을 컴파일합니다. MSBuild는 Typescript의 여러 주요 릴리스를 지원할 수 있지만 정보 창에는 최신 버전 만 표시됩니다.
그 아래에 도착하는 방법은 다음과 같습니다.
A. Visual Studio / MSBuild에 설치된 Typescript 버전을 확인하려면 C : \ Program Files (x86) \ Microsoft SDKs \ TypeScript 폴더의 내용을 확인하십시오. 예를 들어 1.0, 1.8 및 2.2 버전이 있습니다.
B. 프로젝트에서 어떤 버전의 Typescript를 요청 했는지 확인하십시오 . * .csproj 파일에서 <TypeScriptToolsVersion> 태그를 찾거나 누락 된 경우 다음과 같이 추가 할 수 있습니다.
<PropertyGroup>
...
<TypeScriptToolsVersion>1.8</TypeScriptToolsVersion>
...
</PropertyGroup>
C. 마지막으로 MSBuild에서 실제로 사용 하는 Typescript 버전을 확인할 수 있습니다 . 에서 도구 | 옵션 | 프로젝트 및 솔루션 | 빌드 및 실행 설정 은 MSBuild 프로젝트 출력 상세를 에 상세 :
그런 다음 프로젝트를 빌드하고 출력을 검사하십시오. (A)에 설명 된 Typescript 폴더 중 하나에 대한 참조가 표시됩니다.
basarat 의 응답을 바탕으로 Visual Studio 2013에서이를 실행하는 방법에 대한 정보를 조금 더 제공합니다.
- Windows 시작 버튼-> 모든 프로그램-> Visual Studio 2013-> Visual Studio 도구로 이동하십시오. 도구 목록이있는 창이 열립니다.
- VS2013에 대한 개발자 명령 프롬프트 선택
- 열린 콘솔에서 다음을 작성하십시오. tsc -v
- 당신은 버전을 얻는다 : 이미지보기
[최신 정보]
If you update your Visual Studio to a new version of Typescript as 1.0.x you don't see the last version here. To see the last version:
- Go to: C:\Program Files (x86)\Microsoft SDKs\TypeScript, there you see directories of type 0.9, 1.0 1.1
- Enter the high number that you have (in this case 1.1)
- Copy the directory and run in CMD the command tsc -v, you get the version.
NOTE: Typescript 1.3 install in directory 1.1, for that it is important to run the command to know the last version that you have installed.
NOTE: It is possible that you have installed a version 1.3 and your code use 1.0.3. To avoid this if you have your Typescript in a separate(s) project(s) unload the project and see if the Typescript tag:
<TypeScriptToolsVersion>1.1</TypeScriptToolsVersion>
is set to 1.1.
[UPDATE 2]
TypeScript version 1.4, 1.5 .. 1.7 install in 1.4, 1.5... 1.7 directories. they are not problem to found version. if you have typescript in separate project and you migrate from a previous typescript your project continue to use the old version. to solve this:
unload the project file and change the typescript version to 1.x at:
<TypeScriptToolsVersion>1.x</TypeScriptToolsVersion>
If you installed the typescript using the visual studio installer file, the path to the new typescript compiler should be automatically updated to point to 1.x directory. If you have problem, review that you environment variable Path include
C:\Program Files (x86)\Microsoft SDKs\TypeScript\1.x\
SUGGESTION TO MICROSOFT :-) Because Typescript run side by side with other version, maybe is good to have in the project properties have a combo box to select the typescript compiler (similar to select the net version)
The tsc -v
command run technically reads the TypeScript compiler version within the SDK directory set within the Windows Path
variable. This doesn't necessarily reflect the latest version installed as the Path
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
On Visual Studio 2015 just go to: help/about Microsoft Visual Studio Then you will see something like this:
Microsoft Visual Studio Enterprise 2015 Version 14.0.24720.00 Update 1 Microsoft .NET Framework Version 4.6.01055
...
TypeScript 1.7.6.0 TypeScript for Microsoft Visual Studio
....
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 appropriate tsc.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.
I have VS2015 and I have to run a build with TypeScript 1.7, although I have 1.8 installed via npm install typescript -g
there are two ways (at least for me they worked):
- Go to your
.proj
file and add<TypeScriptToolsVersion>1.7</TypeScriptToolsVersion>
as up as possible. Rebuild, re-run. If it doesn't work try 2. - Go to
Control Panel -> System -> Advanced System Settings -> Enviroment Variables
. Make sure you add your desired TypeScript version first:C:\Program Files (x86)\Microsoft SDKs\TypeScript\1.7;C:\Users\serban\AppData\Roaming\npm
This will also affect your CLI:
$ tsc -v
message TS6029: Version 1.7.5
As far as I understand VS has nothing to do with TS installed by NPM. (You may notice after you install TS using NPM, there is no tsc.exe file). VS targets only tsc.exe installed by TS for VS extension, which installes TS to c:\Program Files (x86)\Microsoft SDKs\TypeScript\X.Y. You may have multiple folders under c:\Program Files (x86)\Microsoft SDKs\TypeScript. Set TypeScriptToolsVersion to the highest version installed. In my case I had folders "1.0", "1.7", "1.8", so I set TypeScriptToolsVersion = 1.8, and if you run tsc - v inside that folder you will get 1.8.3 or something, however, when u run tsc outside that folder, it will use PATH variable pointing to TS version installed by NPM, which is in my case 1.8.10. I believe TS for VS will always be a little behind the latest version of TS you install using NPM. But as far as I understand, VS doesnt know anything about TS installed by NPM, it only targets whateve versions installed by TS for VS extensions, and the version specified in TypeScriptToolsVersion in your project file.
First, make sure you have the following address in your Environment Variables
Path
C:\Program Files (x86)\Microsoft SDKs\TypeScript\2.0
Then open your Command Prompt
and type the following command:
tsc -v
You can do npm list | grep typescript
if it's installed through npm.
For a non-commandline approach, you can open the Extensions & Updates window (Tools->Extensions and Updates) and search for the Typescript for Microsoft Visual Studio extension under Installed
Open a (normal, not the VS) command prompt or a PowerShell prompt.
tsc.exe -v tsc.cmd -v tsc -v
If you installed the same version of TypeScript for Visual Studio and using npm, the output from the above three commands should be the same.
If not, check your System PATH to see where in the path hierarchy and which typescript directory is listed. For PowerShell users, the easy way is: $env:path -split ';'
시스템 PATH 변수에 나열된 TypeScript 디렉토리가 없거나 여러 개가 없도록주의하십시오. 2017 년 6 월 9 일부터 내 시스템 PATH는 다음과 같습니다 (이 상황에서 가장 중요한 부분). ps>$env:path -split ';' C:\Windows\system32 C:\Windows C:\Windows\System32\Wbem C:\Windows\System32\WindowsPowerShell\v1.0\ C:\Program Files (x86)\Microsoft SDKs\TypeScript\2.3 C:\nodejs\ C:\Users\{username}\AppData\Roaming\npm
통지 에만 2.3 디렉토리가 PATH, 배수가 아닌 버전에 포함되어 있습니다.
명령 프롬프트에서 다음 명령 중 1을 입력하고 다음을 누르십시오 Enter .
tsc -v
또는
tsc -version
또는
tsc --version
참고 : 명령을 실행하기 전에 환경 변수 경로에 Typescript를 추가했는지 확인하십시오 (자세한 내용은 환경 변수 설정 방법 참조) .
'Programing' 카테고리의 다른 글
{ " (0) | 2020.05.16 |
---|---|
자동 레이아웃이있는 UICollectionView 자체 크기 조정 셀 (0) | 2020.05.16 |
비동기 함수를 호출하는 동안 mocha 테스트에서 시간 초과 오류를 피하는 방법 : 시간 초과 2000ms 초과 (0) | 2020.05.16 |
MYSQL 업데이트 명령문 내부 조인 테이블 (0) | 2020.05.16 |
JavaScript / JQuery를 사용하여 간단한지도를 만드는 방법 (0) | 2020.05.16 |