Typescript v1.3 was announced today, so I installed the power tools update for VS2013.
After installation I can see that Visual Studio now knows about "protected" keyword and tuple types, which is great!
But then I changed the TypeScriptToolsVersion attribute in my *.csproj file from 1.1 to 1.3:
<TypeScriptToolsVersion>1.3</TypeScriptToolsVersion>
After doing this, I get the following error when building:
The specified task executable location "C:\Program Files (x86)\Microsoft SDKs\TypeScript\1.3\tsc.exe" is invalid.
The folder "1.3" has not been created by the installer.
As a workaround, I've been able to get it work by just making a copy of the 1.1 compiler.
Does anyone know why the 1.3 folder was not included in this release?
NB: Using VS Professional 2013 (12.0.30723.00 Update 3)
I looked back in my C:\Program Files (x86)\Microsoft SDKs\TypeScript\3.1 folder where there is a tsc.exe file.
Test that the TypeScript is installed correctly by typing tsc -v into your terminal or command prompt. You should see the TypeScript version print out to the screen. For help on possible arguments you can type tsc -h or just tsc .
If you only have TypeScript installed for Visual Studio then: Start the Visual Studio Command Prompt. Type tsc -v and hit Enter.
The current 1.3 release installs into the 1.1 folder, and new projects will set the <TypeScriptToolsVersion> property in the project file to "1.1" also (as the value from this element is what we append to "C:\Program Files (x86)\Microsoft SDKs\TypeScript" to look for the compiler, so this needs to be in sync).
For the compiler we can have multiple versions side-by-side (as can be seen with 1.0 and 1.1 folders), so the compiler version corresponding to the TypeScriptToolsVersion setting in the project will be used to build the project. We don't automatically move the targeted version forward (in order to enable round-tripping the project with colleges who aren't as cutting edge as you guys ;-)
For the language service in Visual Studio however only one version can be present, which will be the latest version installed. As we aim to maintain backwards compatibility, this shouldn't impact the experience when opening older project versions (other than being more permissive of new features that will fail at compile time with the older compiler).
We do warn when you open a project with an earlier version specified that the project version is out of sync with the language service and this may occur (something like "Your project file uses an older version of the TypeScript compiler and tools than supported by this version of Visual Studio. Your project may be using TypeScript language features that will result in errors when compiling with this version of the TypeScript tools"). This is a harmless warning and you can continue to edit the project. If you do add new features via the language service not supported by the compiler version specified, an error will occur at build time (as per the warning).
It's not ideal and we're discussing how we can make this better. Sorry for any confusion.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With