Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeScript plugin for Visual Studio 2017 download link incorrect #14529

Closed
joeskeen opened this issue Mar 7, 2017 · 63 comments
Closed

TypeScript plugin for Visual Studio 2017 download link incorrect #14529

joeskeen opened this issue Mar 7, 2017 · 63 comments
Assignees
Labels
Fixed A PR has been merged for this issue

Comments

@joeskeen
Copy link

joeskeen commented Mar 7, 2017

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?

@mhegazy
Copy link
Contributor

mhegazy commented Mar 8, 2017

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.

@olmobrutall
Copy link

This means that we'll need to wait for VS 2017 SP1?

TS Refactoring where the the killer feature of VS 2017 for me, snift, snift...

@NoelAbrahams
Copy link

This is terribly disappointing.

@06b
Copy link

06b commented Mar 8, 2017

So if I wanted to use Typescript 2.2.1 in VS 2017- does this mean I need to then rely on something like using gulp to compile the typescript or wait until whenever the next VS update?

Due to some issue with performance (might be related to #14539) my team either had to use VS2015 or use VS2017 using gulp to compile our typescript - however that leaves me to wonder if VS2017 is still respecting <TypeScriptCompileBlocked>true</TypeScriptCompileBlocked> as per #2294 (comment)

@Serivy
Copy link

Serivy commented Mar 9, 2017

Could using the TS2.2.1 msbuild nuget package be a viable work around in VS2017? https://www.nuget.org/packages/Microsoft.TypeScript.MSBuild/

We currently rely on using solely nuget packages as we have many products with varying versions of typescript running on our build machines and since they started putting out nuget packages it has solved a lot of our issues.

@mhegazy
Copy link
Contributor

mhegazy commented Mar 9, 2017

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.

@NoelAbrahams
Copy link

NoelAbrahams commented Mar 9, 2017

@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?

@Serivy
Copy link

Serivy commented Mar 9, 2017

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

@czhower
Copy link

czhower commented Mar 13, 2017

Sorry to add a me too, but every time I try to subscribe to this thread it just blinks and doesn't subscribe me.

Same situation - have code already adjusted for 2.2 and now am stuck in VS 2015. VS Code supports 2.2, its a real shame 2017 is lagging and even a guess at an ETA would be welcome.

@hheexx
Copy link

hheexx commented Mar 14, 2017

What a terrible idea.
Now we can't update to VS2017 because we require TS2.2

Even worse, in the future we will need to have all people on same version of VS and same update.

@olmobrutall
Copy link

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

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

@bdelaney
Copy link

Add me to the whining masses. After incorporating 2.2 features in a VS Code project was surprised to find it gave me the mismatch error when I opened the project on a VS 2017 machine. I installed the VS2015 2.2.1 SDK to see if that would work (did on my origin machine with VS2015), but no!!!
The mismatch I speak of is the warning that VS code shows comparing global tsc with the already updated VS code language service (2.2.1 TS in latest VS code)

echoing @olmobrutall when I installed the VS 2017 update...

@trgagne
Copy link

trgagne commented Mar 17, 2017

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)

@billti
Copy link
Member

billti commented Mar 18, 2017

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.

@olmobrutall
Copy link

Works like a charm! this is Awesome 👍 👍

image

@NoelAbrahams
Copy link

NoelAbrahams commented Mar 20, 2017

@billti, thanks for the workaround. Do you have a rough ETA for when the TS 2.2. plugin for 2017 will be available?

Sorry, to be a pain, but this kind of workaround is not feasible for everyone.

@styfle
Copy link
Contributor

styfle commented Mar 22, 2017

@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?

@mhegazy
Copy link
Contributor

mhegazy commented Mar 22, 2017

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.

@Serivy
Copy link

Serivy commented Mar 28, 2017

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/

@joeskeen
Copy link
Author

"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!

@amirburbea
Copy link

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

@304NotModified
Copy link

Is there an ETA already? Or at least an ETA for the ETA ;)

@amirburbea
Copy link

Yet another update for vs2017, again Typescript remains at 2.1.5

@billti
Copy link
Member

billti commented Apr 13, 2017

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.

@olmobrutall
Copy link

olmobrutall commented Apr 14, 2017

@billti great news, it took some time but with the regedit hack was not too bad.

Will the new setup allow to automatically change the TS version when the branch changes? A common issue our team is to move to an old branch just to realize that with a newer TS version the old code does not compile anymore...

@billti
Copy link
Member

billti commented Apr 14, 2017

I'm not sure what you mean by "..automatically change the TS version when the branch changes". Can you expand on this?

A common issue our team is to move to an old branch just to realize that with a newer TS version the old code does not compile anymore...

Can you detail some specific examples of this? (Code would be ideal). We try hard to maintain back compat, and put any breaking changes behind a flag, so definitely want to avoid this from being necessary. Our goal is that people just move forward without any friction.

@olmobrutall
Copy link

By automatically I mean depending on the configuration on the source control, for example the TS version on the *.csproj, or the version of typescript module in project.json

I can not give you exact examples of this problem, since those issues didn't happen in my project and the version of TS was about 1.4 or 1.5

What you mean by backwards compatibility?. In TS 2.2 with strictNullChecks now there are more issues raised with arithmetic operators. I'm glad that there are new errors for potentially erroneous cases, but this is a breaking change IMO

@saschanaz
Copy link
Contributor

TS has its own release timeline...

@NoelAbrahams
Copy link

@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.

@styfle
Copy link
Contributor

styfle commented Apr 28, 2017

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.

@billti
Copy link
Member

billti commented Apr 28, 2017

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.

@NoelAbrahams
Copy link

@billti, I'm not sure that the fundamental problem has been addressed in your post. Are you able to confirm the following:

Your team will never release a version of TypeScript unless a plugin for the latest version of Visual Studio (or ideally the latest two versions) is also available (unless it is bug fix affecting other IDEs)

Also would you mind letting my know why the following affecting Visual Studio (some of them regressions) are languishing in the pipleline?

#190
#2890
#10204

Thanks.

@billti
Copy link
Member

billti commented May 1, 2017

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.

@billti billti closed this as completed May 1, 2017
@NoelAbrahams
Copy link

Okay, I give up.

On the one hand it is claimed that supporting TypeScript in Visual Studio is a priority, but in practice it is "obviously" not. We have been told to expect releases in the future without Visual Studio support.

The reason there are 1,990 issues open on the TypeScript repo is exactly my point: when this project started back in 2012, Visual Studio was the main focus as an outlet. But now there is a desire to add TypeScript support for every damn thing. That is of course natural. However, my point is, that that support should not be at the expense of your core Visual Studio users.

Next time someone comes around asking me about my Visual Studio experience, this is going to be top of mind.

@saschanaz
Copy link
Contributor

I don't exactly agree with you about the release plan but I at least can feel the pain after I clicked your three issues.

@cchamberlain
Copy link

Any timeline on when this will get promoted to release channel? I'd prefer to not have to tell the whole team to install VS preview, given that you have to have VS closed during the duration of the long install. If its a month out still I may push for people to install it.

@minestarks
Copy link
Member

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

@cchamberlain
Copy link

@minestarks awesome!!

@06b
Copy link

06b commented May 10, 2017

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.

@minestarks
Copy link
Member

minestarks commented May 10, 2017

@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.

@intoxopox
Copy link

Still can't install Typescript 2.3 for VS 2017. Links still broke. Link in blog post mentioned above is only for VS 2015. Please advise.

@saschanaz
Copy link
Contributor

The file name says Dev14Full but it still should work.

@intoxopox
Copy link

I'm afraid it doesn't for me for either VS 2017 v15.2 or VS 2017 Preview v15.3.

@saschanaz
Copy link
Contributor

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

image

@intoxopox
Copy link

Ah. Setting it in options manually worked. I certainly didn't know to look there and set it, so I hope the next installer works better.

@styfle
Copy link
Contributor

styfle commented May 13, 2017

@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.

@304NotModified
Copy link

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)?

That's indeed strange...

@HakanL
Copy link

HakanL commented May 13, 2017

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

@minestarks
Copy link
Member

@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.

@styfle
Copy link
Contributor

styfle commented May 15, 2017

@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.

@minestarks
Copy link
Member

@styfle exact timelines are beyond my control but I'll tell you I'm working on it :)

@cchamberlain
Copy link

@minestarks the MSDN blog site is down, any direct link to grab the 2.3 definitions for VS 2017?

@Drag13
Copy link

Drag13 commented Dec 26, 2017

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

@microsoft microsoft locked and limited conversation to collaborators Jul 3, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Fixed A PR has been merged for this issue
Projects
None yet
Development

No branches or pull requests