Typescript: Build: File 'COMPUTE_PATHS_ONLY.ts' not found trying to go back to 1.7.6

Created on 9 Mar 2016  路  23Comments  路  Source: microsoft/TypeScript

I'm currently using VS 2015 with TS 1.7.6. This was after a short stint with 1.8.6 after it was auto updated to that version. Now I'm getting 'COMPUTE_PATHS_ONLY.ts' not found. I've seen the descriptions of how to unload the project and remove the import lines but that was breaking typescript for other members of the team. How can I remove this error so I can peacefully return to 1.7.6? Thanks...below are my first few lines from my project. Further down I have the tools version line for 1.7. At the bottom is the usual import project for the MSBuildExtensionsPath32 for the TypeScript.targets




Bug Fixed

Most helpful comment

the error indicates that there is a mismatch between your targets (C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\TypeScript\Microsoft.TypeScript.targets) and the tasks dll (C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\TypeScript\TypeScript.Tasks.dll); this would be an issue with the installer not handling a specific order of installing different versions.

Can please try:

  • uninstall TS 1.8.* from Add/Remove Programs
  • uninstall TS 1.7.* from Add/Remove Programs
  • make sure the folder C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\TypeScript is empty, if not remove it manually
  • install TS 1.7.6 again, you should see the folder created in C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\TypeScript

All 23 comments

the error indicates that there is a mismatch between your targets (C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\TypeScript\Microsoft.TypeScript.targets) and the tasks dll (C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\TypeScript\TypeScript.Tasks.dll); this would be an issue with the installer not handling a specific order of installing different versions.

Can please try:

  • uninstall TS 1.8.* from Add/Remove Programs
  • uninstall TS 1.7.* from Add/Remove Programs
  • make sure the folder C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\TypeScript is empty, if not remove it manually
  • install TS 1.7.6 again, you should see the folder created in C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\TypeScript

Thanks Mohamed, that did it.

Sorry for the hassle, we have a problem in our installer (mainly msi limitation) that the target file is unversioned, so installing a earlier version of TS will overwrite it, but not the targets, leaving them in a mismatched state.
We have a fix for that, but unfortunately it is in 1.8.6 and above, so it does not help you much.

Just wondering what caused you to revert back from 1.8?

Our team is still using 1.7.6 as a whole so hopefully we will be moving up soon.

Unfortunately I'm getting the COMPUTE_PATHS_ONLY.ts not found again and the steps above are not the quick fix they were before. Any new suggestions? I no longer have 1.8.6. I even went through the registry. I reinstalled 1.7.6 cleared out the typescript folder and reinstalled 1.7.6 which did add the pertinent files back into the directory but after doing a clean on the solution I get the COMPUTE_PATHS_ONLY.ts not found. I tried to rebuild and get the same thing.

@johnmullany, so what was working yesterday? what changed since? what did you install? is it a different machine? what is the version of the tasks file in C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\TypeScript\TypeScript.Tasks.dll

We are having the same issue on the build server.
The workaround didn't work for us.

VS 2015 Update 1, TypeScript 1.7.6.0

C:Program Files (x86)\MSBuild\Microsoft\VisualStudiov14.0\TypeScript\TypeScript.Tasks.dll version is 12.17.60.24809

@mayvazyan i am assuming you installed 1.8.* before downgrading to 1.7? is this correct?
can you share your install logs, %temp%\dd_typescript*

@mhegazy Thank You very much for the quick response! Your workaround actually worked (instead of 4 compile errors we had just 1 and it was related to the hard coded tools version that project had)

<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v12.0\TypeScript\Microsoft.TypeScript.targets" />

I removed the node_modules directory from our project directory and it seems things are back to normal. Your reply ended up in my spam filter so I just found it today. Thanks for your response and things look good now. I did have to wipe out my node_modules a couple of times but that seem to finish off the problem area I was have with it. Of course I had to do an npm install to get my other dependencies together but it is now working.

looks like this issue has been resolved. please let us know if this is not the case.

I am having this same problem. The fix to delete the contents of Typescript folder (tried deleting whole folder too) does not work. The folder is not recreated after install. I did have this exact issue on vs 2013 side that I hack fixed but i'm afraid that it has hosed my 2015 too.

@ts46235 Which TypeScript folder did you delete the contents from? Your best bet is to install TypeScript 1.8.6

c:Program Files (x86)\MSBuild\Microsoft\VisualStudiov14.0\

I have tried that version. none of the TS versions will recreate the 'Typescript' folder as mhegazy noted. I did used to have VS working with 1.8.6 but i changed the TS for 2013 and then everything has been messed up

Can you repair the newest version of TypeScript in Programs and Features. Just to clarify which versions of VS do you have on your machine?

Alternatively install TypeScript on a clean machine and copy those bits to your broken machine.

sorry for the delay. I had to make sure it was resolved then i had meetings this morning.

It has been resolved. I removed all TS versions and installed the 1.7.6 version, but I think what got it to start working was that I dropped and recreated my solution from source control. I think the problem was with the node_modules folder too. I think if I just drop it and re-do npm install it will fix it.

I got the same error.
When I removed "COMPUTE_PATHS_ONLY" from the line Configurations="$(TypeScriptBuildConfigurations) COMPUTE_PATHS_ONLY" in the file Microsoft.TypeScript.targets, my problem was solved.

Getting similar errors and while I am working through them I thought I'd ask what the COMPUTE_PATHS_ONLY is meant to do? It doesn't seem to be recognised by tsc.exe but I assume it must be there for a reason... Is just flat removing it safe or is this going to potentially result in unexpected bugs further down the line?

So having just done a bunch of uninstalling and reinstalling I now have access to both the old and new version of TypeScript.Tasks. It seems that in the older version it has the following in the execute task:

        if (!responseFileCommands.Contains("COMPUTE_PATHS_ONLY"))
        {
            return base.ExecuteTool(pathToTool, responseFileCommands, commandLineCommands);
        }
        return 0;

In the newer version though it seems that this is now using a property on the task:

        if (this.ComputeOutputOnly || (!responseFileCommands.Contains("--project") && ((this.FullPathsToFiles == null) || (this.FullPathsToFiles.Length == 0))))
        {
            return 0;
        }

So that's why if you have a mismatched target file it will fail. The one that I have that goes with the older version has:

Configurations="$(TypeScriptBuildConfigurations) COMPUTE_PATHS_ONLY"

Whereas I assume the newer one won't have this hack and will set the property separately if it doesn't want it to do a real build.

@passle-chris You are correct, the main reason to get mismatched versions of the task and the targets file is when you manually edit the file... this signals to the installer that it no longer owns that file, and it has trouble replacing it. I'm sure there's a bunch of other ways you can confuse the installer, but I'm not an installer expert, and no-one has been able to tell me how to reliably handle this case. That said, things should be more reliable with the new low impact installer for VS.

@paulvanbrenk Yeah, mhegazy, explained above how this happened. I certainly hadn't manually edited any of these files. The reason for my post is that I was considering it after RHCoenen's comment. In the end what worked for me was uninstalling all typescripts, removing the relevant directories from MSBuild to make sure no old files were lying around and then reinstalling 1.4 and 1.7 (the two versions that our codebases use). My comments were in large part because I could find no information on what COMPUTE_PATHS_ONLY does and the build log was slightly confusingly suggesting that this was being passed to tsc.exe even on a working system (because it is outputting the command even if it doesn't then run it). I was very confused about how it was that on some systems tsc.exe accepted this as a command line argument and some didn't. The above explains why this unexpected behaviour was being seen.

It may never be of use to anybody but figured I'd done the research so might as well record it somewhere relevant in case somebody else like me comes along with similar questions. :)

I'd also like to confirm that Mohamed's solution worked for me. Although I must admit, I came to try it after finding no solution for a similar issue with TS 1.8.5 and Visual Studio 13.

Thanks Mohamed. The solution that you have mentioned is a life saver. I was able to fix my development machine issue with it. I removed latest versions of typescript but was stuck with this tsc-exe-exited-with-code-1 issue. Got that working with the solution mentioned above.

I have the following configuration:
VS 2013
TypeScript v 1.6

I cleared both folders v 12.0 and 14.0 and re-installed TypeScript version 1.6 for visual studio it worked.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

remojansen picture remojansen  路  3Comments

bgrieder picture bgrieder  路  3Comments

wmaurer picture wmaurer  路  3Comments

weswigham picture weswigham  路  3Comments

kyasbal-1994 picture kyasbal-1994  路  3Comments