TypeScript: TypeScript plugin for Visual Studio 2017 download link incorrect

Issue detail: Go to http://www.typescriptlang.org/#download-links

If you click on Visual Studio 2015, it takes you to the download page for TypeScript for Visual Studio 2015 (https://www.microsoft.com/en-us/download/details.aspx?id=48593).

If you click on Visual Studio 2017, it takes you to the download page for Visual Studio 2017. The version of TypeScript in Visual Studio 2017 does not appear to be the latest (for example, it can’t find the object type).

Is there an official TypeScript for Visual Studio 2017 plugin, or a way to get it to use a newer TypeScript?

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Reactions: 7
  • Comments: 63 (23 by maintainers)

Most upvoted comments

This is terribly disappointing.

@mhegazy,

We should be publishing updates to VS 2017 soon with newer versions of TS.

We would ideally like to see this treated as a higher priority than it appears to be right now. The fact is there is no way for us to use VS 2017 because we have already migrated to TS 2.2. Since this is a significant new version (and not just a bug fix), there is no point upgrading just the build without language service support. We’ll just end up with red squigglies all over the IDE.

Are you able to provide a time frame for when the TS 2.2 plugin for VS 2017 is likely to be released?

Thanks for the feedback. We are working hard on resolving this, and will have a supported solution out as soon as we can. There are some installer design constraints and challenges we need to work through in the new model.

In the meantime, there is a workaround you can use to unblock yourself, just know this is unsupported, and intended for use internally by our dev team during development. It is however very easily done (and more importantly – undone if you hit issues with it).

There is a registry key the language service in VS checks for that will override the default location it loads the language server (tsserver.js) from. This language server is also provided in the NPM package. Therefore, you can install TypeScript 2.2 from NPM (or build locally), and use the registry to instruct VS to use this version of the language server.

Note: This doesn’t update the grammar file VS uses, so new syntax may not colorize correctly. Also, we have not tested this to the level of an “official” release, so while we’re unaware of breaking changes, you may hit issues. (For example, automatic type acquisition for loose library files doesn’t work without extra steps - so if you have jquery.js simply copied into your project, you won’t see jQuery intellisense automatically).

Here is how I set it up on my machine:

  1. Create a folder to install the NPM package into if you don’t have one already, e.g. C:\temp\ts22.
  2. Initialize this folder as a NPM folder, and install the latest TypeScript into it (e.g. npm init -y, npm install --save typescript).
  3. Open the registry (regedt32), and locate the root key for your install of VS 2017 (each install has a unique suffix after “15.0_”, if there is only instance installed, this is easy to spot). An example path is shown below. (See the full path in the status bar).
  4. If not present, add a registry key under this named TypeScriptLanguageService.
  5. Inside this add a new string property named CustomTSServerLocation, with the value being the full path to the tsserver.js installed in the above NPM package.

Your registry should appear something like:

ts2 2-reg

If you launch VS 2017 now and open a TypeScript file, you should notice you are using TypeScript 2.2, e.g. the below code is from the 2.2 release blog:

ts2 2

If you open Task Manager, you can also check the Node.exe process powering the language service is using the tsserver.js using the path specified in the registry, e.g.:

ts2 2-proc

To undo this change, simply delete or rename the CustomTSServerLocation registry property.

Note that building in VS will still use the TS 2.1 compiler by default. You’ll need to either build outside VS, or install the 2.2 SDK and set the MSBuild property as Mohamed outlined above. (Compile on save will use the newly pointed to language server however).

Again, this should be seen as a temporary workaround, not a solution! This is not a product “feature”, but a capability we use to develop internally - but it should unblock you for now until we have the fully baked solution in place.

Thanks for sticking with us, and sorry for the inconvenience.

Me today seeing there is an update in VS2017 😄 😄 😄

…me after seeing it does not include TS 2.2 😟 😢 😟

Visual Studio 2017 ships with a built in version of TypeScript. The current version is TS2.1. Newer versions of TS will be available throughout the VS update vehicles in the future; and will not be available as out of band installers like in VS2015 and VS2013.

Support for new versions of TypeScript (side-by-side) in VS 2017 will be out soon (i.e. hopefully within a week) in the Preview channel (https://www.visualstudio.com/vs/preview/). Once it has had some miles on it there and there are no major issues (it is quite a big change internally), it will move to the “main” VS release channel.

Due to engineering changes (esp. the new VS 2017 setup model) and release timelines, your statement is exactly what happened with VS 2017 and TypeScript 2.2 & 2.3, so confirming that will never happen is obviously not realistic.

There are currently 1,990 issues open on the TypeScript repo, and more in our internal database that tracks feedback from other channels. This includes bugs, suggestions, questions, etc… We address issues in the order we believe has the most cost/benefit with the time & resources we have, not in the order logged.

As the 2.2 & 2.3 SDK is now downloadable for VS 2017, I’ll close this issue. The TypeScript work is done. The VS work is also done and is available in the Preview channel, and will be promoted to the “release” channel in the near future.

Visual Studio feature updates to the main channel (not the Preview channel) are unlikely to match the speed of VS Code releases or TypeScript publishing to NPM. Those are both much lighter weight products with much smaller teams compared to the effort needed across dozens of teams with hundreds of developers to push out a Visual Studio release.

That said, with the work we have in the pipeline for the next Visual Studio release (hopefully within the next few weeks - or available now in the Preview channel), from then on as soon as TypeScript publishes a release, you will be able to download and install it and use it in Visual Studio 2017 just as you can with Visual Studio 2015, and will also be able to easily switch between multiple installed TypeScript versions (something you can’t do with VS 2015).

This is a point in time problem, and the problem will soon be in the past. We all wish we could click our fingers and resolve these issues immediately, but engineering takes effort. That effort is happening.

@06b Good catch. You can install 2.3 from the download link referenced in this blog post (scroll down to where it says “simply installing it from here”). Looks like the website needs updated. Will look into that.

After you install 2.3 go back to VS 2017 settings and you should see 2.3 in the list.

@cchamberlain , thanks for asking. Visual Studio 15.2 is live today.

@SaschaNaz Thanks!

That intellisense option is very confusing. Why would anyone want an intellisense version that is different than the build version (defined in the .csproj file)?

Maybe @minestarks or @billti could comment on why VS intellisense doesn’t default to the version in .csproj file.

Did you check this new option? You may have to switch to 2.3 manually.

image

Just a clarifications there are two different parts here, 1. the version of the compiler you build against and 2. the version of the language service in the IDE (i.e. completions and errors).

Normally you would have them both the same, but that is not a requirement; you can build against a different version assuming you have it installed on your machine.

So, if you need TS 2.2.1 for some bug fix that is blocking your build you can, as @Serivy noted, use the nuget package, or you can just update your <TypeScriptToolsVersion>2.2</TypeScriptToolsVersion> in your project file. assuming you have already installed the TS2.2.1 installer for VS 2015, it should have installed the TS 2.2 SDK to C:\Program Files (x86)\Microsoft SDKs\TypeScript\2.2 and your build should use that instead of TS2.1.

As for updates to the language service; VS 2017 has a revamped setup and the installers we used in previous versions are no longer applicable. We should be publishing updates to VS 2017 soon with newer versions of TS.

@styfle @304NotModified Our long term plan is in fact to base the language service version off of what’s specified in the .csproj file to match the build. @HakanL with multiple projects simultaneously open with different TypeScript versions, we’d end up choosing one version and running with that. It’s not our goal to have multiple language services running at the same time – the memory and scalability issues it presents are not worth the value added. I’d recommend upgrading all projects in the same solution to use the same TS version.

So… don’t shoot the messenger…

Downloaded Visual Studio 15.2, I have the option to change the TypeScript version… only options I see are 2.1 & 2.2.

I visited the typescriptlang.org site, see that TypeScript 2.3 is now available. Click Download which takes me to http://www.typescriptlang.org/#download-links, click Visual Studio 2017 and get a link to the annoucement of the RC - https://blogs.msdn.microsoft.com/typescript/2017/03/27/typescripts-new-release-cadence/

Still can’t download 2.3 so technically this is still an issue. Sorry.

Agreed. I am at a point now where I feel VS Code has much better tooling and release cycle than VS Enterprise.

Now all we have to do is migrate our legacy code to stop paying Microsoft for enterprise licenses. Then we can be fully in the open-source world where the support is apparently better.

Another update for VS came through and yet again my TypeScript is still 2.1.5

“We’ve heard feedback from several users about their need to move to TypeScript v2.2 in Visual Studio 2017 and understand the confusion and pain this has caused. As a team, we’re actively working on the problem and hope to have a fix available soon. We’ll keep the community updated as we make progress. Once implemented, developers will have full flexibility to update as soon as a new version of TypeScript is available. We apologize for the confusion and want to assure you that fixing this issue is a top priority.”

Thanks @DanielRosenwasser for writing this blog post, and @Serivy for posting the link! I eagerly await being able to use VS 2017 with the latest TypeScript!

Just read their blog post which gives us an update on this issue: https://blogs.msdn.microsoft.com/typescript/2017/03/27/typescripts-new-release-cadence/ Sounds like they are planning to allow us to update as soon as its avaliable which is great.

“We’ve heard feedback from several users about their need to move to TypeScript v2.2 in Visual Studio 2017 and understand the confusion and pain this has caused. As a team, we’re actively working on the problem and hope to have a fix available soon. We’ll keep the community updated as we make progress. Once implemented, developers will have full flexibility to update as soon as a new version of TypeScript is available. We apologize for the confusion and want to assure you that fixing this issue is a top priority.”

I hope the extension targets the nuget packages language service or something flexible like that. Juggling the installed versions has always been a pain and back with the msi issue in version <1.8 we had a lot of headaches. I like how wix has broken their vs experience into an extension and then the installer just installs the sdk (of which nuget can be used for specfic projects and build servers). http://robmensching.com/blog/posts/2017/3/7/wix-v3.11-release-candidate/

Same here, it’s a real bummer. On top of that, VS 2017 no longer supports tslint (but it does linting coffescript out of box (In Web Code Analysis menu in Tools), which make no sense. MS is not even supporting their own language for linting)

Yet another update for vs2017, again Typescript remains at 2.1.5

Is there possibility to force VS17 use tsc from node_modules (for IntelliSense and build) like VS Code does?

@styfle exact timelines are beyond my control but I’ll tell you I’m working on it 😃

And what if you have different projects in your solution with different TypeScript versions?

@minestarks, it’s issues like the following that suggest that Visual Studio issues are really low priority for your team.

#190 #2890 #10204

Some of these are actual regressions and yet still remain apparently a low priority. I am personally quite disappointed these issues have not been fixed as they affect productivity significantly.

This is not the first time the fact that TS is neglecting Visual Studio has been brought to your attention. See #2656.

Has there been any thought in making visual studio plugin use the targeted typescripts language service like we have in VSCode instead of having one plugin per version?

I can only assume something like this is in the pipeline considering tslint disappeared from the list of lints provided from web tools? https://twitter.com/VisualStudio/status/826437631831597056

@minestarks

Our long term plan is in fact to base the language service version off of what’s specified in the .csproj file to match the build.

That sounds great! But what does “long term” mean? 1 month, 1 year, 5 years, 10 years? Currently VS Code already supports this feature so if this feature never comes to VS Enterprise, my long term goal will be moving our developers to VS Code.

Can’t help but laugh when I read that Typescript 2.3 was released but VS2017 users will have to use Update 2 Preview.

I can understand the idea of having TS being pushed out via VS instead of using the out of band installers but at the same time sort of makes you wish the option was there for those who want to make use of the newest release… or perhaps not announce releases when it still isn’t ready for the main vs release.

@pksorensen @NoelAbrahams Rest assured this is still a priority. TypeScript 2.2 is already available in Visual Studio 15.2 Preview

@billti A week has passed 😃 Whats the status - this is blocking us 😉 Really dont want to instruct the hole team to fiddle with registry.

For this update the editor version is set in Tools / Options (build still uses the project version). The plan is to have a future update automatically switch the editor version based on the project setting on solution load, but that is more work that we could fit in the time frame for this update, unfortunately.

Visual Studio Code supports switching typescript versions between different projects, https://code.visualstudio.com/Docs/languages/typescript#_using-newer-typescript-versions

Can Visual Studio 2017 support a similar concept?

Currently if you have the <TypeScriptToolsVersion> set in your .csproj, then the build should honor that (assuming you have that version installed on the machine).

With the upcoming change, the editor version is selected from those available via Tools / Options, and hot reloads when changed (i.e. you don’t need to reload the project, or even close/reopen files, when changed). We’re debating how complex it would be to have the editor honor the project version also (which has a number of non-trivial problems to solve - e.g. if a solution contains multiple projects with different versions, etc.).

The installer for VS 2015 should install the build tools only if VS is not installed on the machine.

We also recommend using the nuget package for build server scenarios.

@mhegazy How are we expected to install TSC on our build servers? Do you have to install the complete VS 2017 or just the Build Tools 2017?