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
Bad path when installing TypeScript 1.4 for Visual Studio 2013 #3493
Comments
Also found others with the same issue: Solutions are kinda ugly. |
The issue is with MSBuild. I am not completely sure but I think when VS.NET 2013 TypeScript Extension is installed it sets the version of the Typescript somewhere. TypeScriptToolsVersion = 1.4 So I modified the MSBuild for the machine: C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\TypeScript to the following:
|
The extra version in the path seems to be coming from the "VsTsc" task (TypeScript.tasks.dll) which appends the version number in the "FindToolPath()". So, the workaround is to remove the version from TscToolPath for now. |
After some investigating, it seems that there is a mismatch between the targets file and the VsTsc task. Somewhere around the 1.4 timeframe we moved the logic for concatenating the version with the SDK path from the targets file to the task; so the version should only be added once. So removing this line
is exactly what we did and is the correct solution. Why or how this mismatch happens, I have no idea... and the linked threads don't give a good indication. My guess is that the specific order of installing versions (both TypeScript, VS, and possibly VS Updates) matters. We have a plan to make our installer story behave better in this case, but that involves some setup architecture changes, which may not be ready for 1.6. |
Paul, I had a fresh install of Visual Studio.NET 2013 and Visual Studio.NET 2015 when I encounter the issue. I hope this helps. |
@kdcllc In which order did you install VS and the TypeScript packages? |
Paul, I don't remember the complete installation procedure I followed but from the log it see that TypeScript tooling for VS.NET 2015 was installed first then VS.NET 2013. I hope this helps. |
Thanks I'll see if that makes a difference |
This is fixed in TS 1.5 both for VS 2013 and VS 2015. If you have the same issue with 1.5 please re-open. |
@paulvanbrenk nice!! |
I am having these exact issues. No matter what I do VS will not let me compile my Typescript. |
@j3ebf what version of vs and what version of type script are you using? |
I am using vs2013 community. And my Typescript version is 1.5. |
I've just had this issue occur on the hosted build service. C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\TypeScript\Microsoft.TypeScript.targets(103,5): error : Your project file uses a different version of the TypeScript compiler and tools than is currently installed on this machine. No compiler was found at C:\Program Files (x86)\Microsoft SDKs\TypeScript\1.4\1.4\tsc.exe. You may be able to fix this problem by changing the element in your project file. Using TS 1.4 and all the symptoms are to the T matching the issue that's supposed to be fixed in the blog below. |
I'm also experiencing this. I have also posted on Stack Overflow here: I have also linked back to this page. |
This also started occurring for me this morning. My CI builds were running fine yesterday, and the last successful build finished at 5:03:13 PM (Eastern Time) on 8/31/2015. This was my last build of the day, so I can't give any more insight as to when the build stopped working, just sometime between then and 9:00am this morning, but from @dimkanewtown's post, it appears to have stopped working as of 11:30pm on 8/31/2015. Hope this info helps! (I'm using VS 2015 Enterprise, and my projects are using ASP.Net 4.5) |
We have contacted the VSO team and they are aware of the issue and working on a fix. |
The VSO team is updating the image. The reason it regressed was order of VS installs and TS updates on the hosted image |
thanks for the update. adding the below command to the msbuild arguments helped me get past the problem /p:TscToolExe="..\tsc.exe" |
VSO should be good now. You should be able to remove the workaround |
I have both VS2012 and VS2013 on my system. after installing typescript 1.5. if i do tsc -v, i get 1.0.3. is it C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v12.0\TypeScript\Microsoft.TypeScript.targets I changed to 1.5. still it's not working. Need help. |
|
I have 1.5. Installed typescript globally(npm install -g typescript). In cmd (tsc -v), i get 'tsc' not recognized as internal.. after deleting typescript/1.0 folder . I am trying to setup VS 2013, typescript ans tsd.. having hard time. |
@rnetdev6 TypeScript 1.0 setup used to add tsc.exe to the path. we stopped doing that since. so if you want tsc to be visible everywhere, add it to your path (e.g. |
Thanks @mhegazy . It's working. I need this change for Visual Studio Code. |
copy 1.4 folder within the 1.4 folder, and it will work. tried the other workarounds suggested above with no luck. this bug is still present at the date of writing 21.jan.2016 |
@paulici12 is 1.4 the only version of TypeScript you have installed? |
1.0, 1.1, 1.4, 1.5, 1.7. I've seen this on both 1.4 and 1.5 |
What's the version of |
I'm at home right now, and I'm having this issue on my work computer. I'll check it out, and post it back tomorrow. |
v12.0\TypeScript\TypeScript.Tasks.dll : 12.17.40.24720 these are the product versions displayed under details in the file preferences tab. |
Yes, those were the versions I needed. Can you create a sample project and share that on onedrive/dropbox, I have some trouble reproducing. |
I'll send you a link to a dropbox zipped file, on monday when I get back to the office. I've seen this on VS2013. I have VS2012 and VS2015, but I've since applied the fix I wrote about, so I don't know where else this issue might be manifesting. I'll remove it on monday, and try it out in the other VS versions as well. I live in Denmark at GMT+1, so I'm guessing there's a timezone gap between us, which might be hindering communication on a more regular basis, but I'll try to post as soon as I can. |
VS2013 is the only one producing the error. I tried 2012 and 2015 and they compile just fine. |
I think I have a fix which should go into 1.8 final.. however, in the mean time. Can you check the |
Hey Paul, there WAS a toolsversion appended to the toolpath in v12.0, and removing it DID fix the issue, so kudos to you! The advice further up suggests the same thing, but for v14.0. I didn't think about trying v12.0 instead. Thanks for helping me get to the bottom of this, and I hope your 1.8 fix will work for everyone. |
@defyjoy this is tracked by #4971. sorry for the trouble. As a work around please follow the steps in #4971 (comment) |
I installed TS for VS2013 using this link: https://visualstudiogallery.msdn.microsoft.com/2d42d8dc-e085-45eb-a30b-3f7d50d55304
Close VS, reopen VS, create new TS HTML project, get these errors:
Notice the "1.4" is doubled in the path.
The text was updated successfully, but these errors were encountered: