I bothered @DanielRosenwasser with something similar on gitter yesterday, but I want to reduce the problem to something even easier.
I want to upgrade to the latest version of TypeScript - 1.7.3 - but I'm actually not sure how I can do that when using Visual Studio, which was installed with an older version. It seems like I must be somewhere around TypeScript 1.6, as both the exponentiation operator and this typing don't work.
What I've tried to do to upgrade my version:
It claims that TypeScript is already installed and there's nothing to do. Just for fun, I tried to remove it and reinstall it anyways. No luck.
npm install -g typescriptThis had no effect, as far as I can tell.
npm install typescriptAlso did nothing.
This stopped the red squiggles from appearing under my exponentiation operator and this type! Promising! However, when I try to compile, I get errors when I try to use features from 1.7 anyways. It's as if Visual Studio is using two separate compilers.
Thanks for your help.
TypeScript 1.7 is part of VS 2015 Update 1, please install VS 2015 Update 1.
If you enabled DevMode, it will always pick the files from this location, so if you are not doing active development on the TypeScript repo, i would disable it.
That is very helpful, thank you! Though I found it strange that I couldn't find a link to that anywhere on the TypeScript site.
Is there a way by which I can upgrade Visual Studio to the next version of TypeScript (that is, the latest off this repository)?
There are two pieces to the typescript plugin in VS; 1. The language service, this is your completion, colorization, signature help, etc.. You can update to the latest using the DevMode as you alluded to earlier. 2. The MSBuild integration pieces, this includes target file, tasks dll and the command line compiler executable (tsc.exe), you can update the manually, but there is nothing like the DevMode currently. We should have a nugget package available in the upcoming weeks, and that should making updating the MSBuild integration and command line compiler straight forward.
hey @mhegazy I seem to be stuck at TypeScript 1.8.34.0 (according to "About Microsoft Visual Studio") and I'm not sure how to update it using DevMode. I flollowed this and created the EnableDevMode key with a value of 1, but just don't see how that helps me get TypeScript to version 1.8.6. Maybe this thread is too old or maybe I just need directions?
this thread is probably not the same issue you are running into TS 1.8.34 is the latest TS 1.8.* release. it is the same compiler version as 1.8.10, but some updated VS plugin code, hence the higher version. so having TS 1.8.34 means you are all set with TS 1.8.
Hmm... that throws me off because I've come across a number of forum posts saying that updating to 1.8.6 helped resolve the issue with compileOnSave not working. Plus, when I look here it says 1.8.6.0...
In any case, I've tried everything and can't get VS to compile my typescript unless I do a full rebuild after every change. I've scoured the forums and nothing has really helped. Oddly, it worked again for a little while after I switched to my new dev. machine but then stopped working again. I thought that was fixed? I have tsconfig compileOnSave set to true and have tried just about every other tweak or update I've found online. I can't believe it's still not working.
can you log a new issue, and give us some more information about what you are running into to help diagnose the problem?
Yeah I'll do that if I should. I've hesitated to log an issue because lots of very closely related, though not identical, issues have been logged.
I'm having the exact same issue. The tsconfig page indicates that compileOnSave is avaiable for typescrip TypeScript 1.8.4 and above, but my about page also indicates 1.8.35. Visual Studio doesn't compile the files unless I remove the tsconfig.json file. Seems to be the exact same thing as you, Methodician.
Hey PEsteves8! I'm onto a new project now and it seems to be working
(though I'm working with .net 4.x rather than core ATM) but it was working
to start last time too, then stopped unexpectedly. I was wondering if you
could log an issue? @Mohamed Hegazy suggested I do but I have never before
and not sure where to start and having trouble finding the time to research
the process...
Thanks!
On Fri, Jul 22, 2016 at 8:39 AM PEsteves8 [email protected] wrote:
I'm having the exact same issue. The tsconfig page indicates that
compileOnSave is avaiable for typescrip TypeScript 1.8.4 and above, but my
about page also indicates 1.8.35. Visual Studio doesn't compile the files
unless I remove the tsconfig.json file. Seems to be the exact same thing as
you, Methodician.—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/Microsoft/TypeScript/issues/5995#issuecomment-234577887,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AEQPtqRpFRU8GNX-HqG14Wv-UZmqMttbks5qYOQfgaJpZM4GxOLc
.
After multiple reinstalls/repairs, cache and temp folder deletions, things eventually started working, after I kind of installed Typescript 2.0 beta. I think. So problem solved.
Mysterious bugs... A bit frustrating when noone can ever quite put their
finger on the root cause of a common problem but that's modern programming
for 'ya. Vast code bases with their own quirks.
On Wed, Jul 27, 2016 at 3:42 AM PEsteves8 [email protected] wrote:
After multiple reinstalls/repairs, cache and temp folder deletions, things
eventually started working, after I kind of installed Typescript 2.0 beta.
I think. So problem solved.—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/Microsoft/TypeScript/issues/5995#issuecomment-235550269,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AEQPtqOdeckbvqcI5xpjCIs8M5UVyd3vks5qZzX_gaJpZM4GxOLc
.
I guess the issue is that there are multiple tsc.exe on the path and the first one is the old one (in my case 1.0.3):
PS C:\Users\moozz_000> where.exe tsc
C:\Program Files (x86)\Microsoft SDKs\TypeScript\1.0\tsc.exe
C:\Program Files (x86)\Microsoft SDKs\TypeScript\1.0\tsc.js
C:\Users\moozz_000\AppData\Roaming\npm\tsc
C:\Users\moozz_000\AppData\Roaming\npm\tsc.cmd
When you type just tsc the first is matched:
PS C:\Users\moozz_000> tsc --version
Version 1.0.3.0
PS C:\Users\moozz_000> tsc.cmd --version
Version 2.0.3
I updated my VS C:\Program Files (x86)\Microsoft SDKsTypeScript from 1.8 -> 2.0 via the Angular's VISUAL STUDIO 2015 QUICKSTART,
prereq #4 --> Download and install TypeScript 2.0 for Visual Studio 2015
Most helpful comment
I guess the issue is that there are multiple
tsc.exeon the path and the first one is the old one (in my case 1.0.3):When you type just
tscthe first is matched: