How to edit Typescript 1.4 "given task execution location"?

I am updating the project to use the latest versions of everything. I just upgraded the MVC 4 project from .Net 4.0 to .Net 4.5.1. Then I updated the nuget packages (uninstalling some and reinstalling, as they were based on .Net 4.0). Afterword, I upgraded the Typescript machine version to 1.4, which is when it all got into the fan. Just two simple mistakes. First:

The project file uses a different version of the Typescript compiler and the tools that are currently installed on this computer. No compiler was found in C: \ Program Files (x86) \ Microsoft SDKs \ TypeScript \ 1.4 \ 1.4 \ tsc.exe. You can solve this problem by changing the item in the project file.

I made sure that this parameter is set to "1.4"

<TypeScriptToolsVersion>1.4</TypeScriptToolsVersion> 

Second error:

The specified job for the executable object "C: \ Program Files (x86) \ Microsoft SDK \ TypeScript \ 1.4 \ 1.4 \ tsc.exe" is not valid.

So, I tried to find the place where the path was installed, and pull it to where he tried to look in the second folder "1.4". The path should be:

C: \ Program Files (x86) \ Microsoft SDK \ TypeScript \ 1.4 \ tsc.exe

I can not find where it is installed, and how I can change it.

I tried:

Reinstall and restore Typescript 1.4 and search wherever the path is specified.

I read the answers that include the check "Check the PATH environment variable". I can’t find where to change this, and at that moment my brain is angry.

I am in Visual Studio 2013 Ultimate. Thanks.

+8
visual-studio-2013 asp.net-mvc-4 typescript
source share
7 answers

I had the same problem. Only in this way I found that I was just creating a new folder "1.4" in C: \ Program Files (x86) \ Microsoft SDKs \ TypeScript \ 1.4 and copy it to 'C: \ Program Files (x86) \ Microsoft SDK \ TypeScript \ 1.4 ** 1.4 ** 'all files from the parent directory.

Stupid solution, but it works for me.

+12
source share

Decision:

  • Go to C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio and rename the typescript folder inside your version of VisualStudio. For example, I renamed the typescript folder inside v12.0 .

  • Go to C:\Program Files (x86)\Microsoft SDKs and rename typescript .

  • Go to the "Programs and Features" section of the control panel, search for Typescript and repair Typescript.

This solution will fix the problem, now you can delete the renamed folders

+8
source share

I installed version 1.5 and then uninstalled it. After I uninstalled 1.5, I started getting the same error you get. To fix this, I had to start the repair on the Visual Studio installation control panel. Running repair in Visual Studio will fix the SDK path references.

I do not know if these steps are needed, but before starting the repair, I manually switched to:

C: \ Program Files (x86) \ Microsoft SDK

and renamed to TypeScript folder.

Several versions of Visual Studio can be specified in the MSBuild path. I went into each and renamed the TypeScript folder.

C: \ Program Files (x86) \ MSBuild \ Microsoft \ VisualStudio \ v11.0 \

C: \ Program Files (x86) \ MSBuild \ Microsoft \ VisualStudio \ v12.0 \

C: \ Program Files (x86) \ MSBuild \ Microsoft \ VisualStudio \ v14.0 \

Then I started the repair when installing Visual Studio from the control panel. If you do not want to start the repair during a full installation, and you have the original installation media, or you can run the TypeScript SDK and VS packages:

H: \ packages \ TypeScript_SDK

H: \ packages \ TypeScript_VS

After starting the repair or launching the packages separately, you will have the old TypeScript version installed and now you can go to Visual Studio and use the Extensions and Updates dialog to install TypeScript 1.4.

+5
source share

EDIT: I had more problems than this, and found out that I needed Project 1.0 . So I had to get back to this by removing TypeScript, deleting / renaming C:\Program Files\MSBuild\Microsoft\VisualStudio\v12.0\TypeScript and C:\Program Files\Microsoft Visual Studio 12.0\Common7\IDE\CommonExtensions\Microsoft\TypeScript , and then launch the restore option from the install / uninstall program.


For me, I set 1.5 and had a requirement to return to 1.4 . Returning to 1.4 , I needed to change

Microsoft.TypeScript.Targets

in

C:\Program Files\MSBuild\Microsoft\VisualStudio\v12.0\TypeScript\

Commenting on adding TypeScriptToolsVersion from this

 <PropertyGroup> <TypeScriptToolsVersion Condition="'$(TypeScriptToolsVersion)'==''">1.4</TypeScriptToolsVersion> <TscToolPath Condition="'$(TscToolPath)' == ''">$(MSBuildProgramFiles32)\Microsoft SDKs\TypeScript</TscToolPath> <!--<TscToolPath Condition="'$(TypeScriptToolsVersion)' != ''">$(TscToolPath)\$(TypeScriptToolsVersion)</TscToolPath>--> <TscToolExe Condition="'$(TscToolExe)' == ''">tsc.exe</TscToolExe> <TscYieldDuringToolExecution Condition="'$(TscYieldDuringToolExecution)' == ''">true</TscYieldDuringToolExecution> </PropertyGroup> 

to that

 <PropertyGroup> <TypeScriptToolsVersion Condition="'$(TypeScriptToolsVersion)'==''">1.4</TypeScriptToolsVersion> <TscToolPath Condition="'$(TscToolPath)' == ''">$(MSBuildProgramFiles32)\Microsoft SDKs\TypeScript</TscToolPath> <TscToolPath Condition="'$(TypeScriptToolsVersion)' != ''">$(TscToolPath)\$(TypeScriptToolsVersion)</TscToolPath> <TscToolExe Condition="'$(TscToolExe)' == ''">tsc.exe</TscToolExe> <TscYieldDuringToolExecution Condition="'$(TscYieldDuringToolExecution)' == ''">true</TscYieldDuringToolExecution> </PropertyGroup> 
+1
source share

I also got this error in VS2013:

The specified job executable object "C: \ Program Files (x86) \ Microsoft SDK \ TypeScript \ 1.4 \ 1.4 \ tsc.exe" is an invalid error.

Here is the solution that worked for me, this paulvanbrenk GitHub comment:

I think I have a fix that should go to 1.8 finals .. however, at the same time. Can you check the Microsoft.TypeScript.targets files in C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v12.0\TypeScript and see if there is a TscToolPath element that adds TypeScriptToolsVersion . Removing TypeScriptToolsVersion from this element should fix the problem.

+1
source share

1.4

The version of the tools is not the same as the version of the compiler. For 1.4 version 1.0 (I think).

I can not find where it is installed, and how I can change it.

It is installed in your Microsoft.TypeScript.targets (location like: C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v11.0\TypeScript ). The mine contains:

  <PropertyGroup> <TypeScriptToolsVersion Condition="'$(TypeScriptToolsVersion)'==''">1.0</TypeScriptToolsVersion> <TscToolPath Condition="'$(TscToolPath)' == ''">$(MSBuildProgramFiles32)\Microsoft SDKs\TypeScript</TscToolPath> <TscToolPath Condition="'$(TypeScriptToolsVersion)' != ''">$(TscToolPath)\$(TypeScriptToolsVersion)</TscToolPath> <TscToolExe Condition="'$(TscToolExe)' == ''">tsc.exe</TscToolExe> <TscYieldDuringToolExecution Condition="'$(TscYieldDuringToolExecution)' == ''">true</TscYieldDuringToolExecution> </PropertyGroup> 

PERSONAL OPTINIANS: I do not use visual studio / msbuild and recommend that you invest in an OSS editor such as atom (disclaimer: maintainer) and assembly pipeline, for example, grunt OR gulp.

0
source share

It was a TypeScript bug that supposedly was fixed. The error duplicated the TypeScript version in the path.

Link: https://github.com/Microsoft/TypeScript/issues/3493

Note: A similar problem occurs if you are trying to create using Visual Studio Online. According to the same topic, the VSO team knows and is working on a fix ...

0
source share

All Articles