-
Notifications
You must be signed in to change notification settings - Fork 12.8k
No compiler was found at C:\Program Files (x86)\Microsoft SDKs\TypeScript\tsc.exe #2039
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
Comments
Very strange, good info though, definitely some suspicious behavior in a couple spots there. |
What does the targets file look like? "C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v12.0\TypeScript\Microsoft.TypeScript.targets" and "C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\TypeScript\Microsoft.TypeScript.targets" And which versions (inc. updates) do you have on this machine? |
@paulvanbrenk, the In the meantime I have got this working - not exactly sure how. I think the fix is to uninstall the VS 2013 powertool and re-install it after VS 2015 is installed. Seems to be related to #1177 I guess to find the root cause of this problem, one must get hold of the <Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<VsToolsPath Condition="'$(VsToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VsToolsPath>
</PropertyGroup>
<UsingTask TaskName="TypeScript.Tasks.VsTsc" AssemblyFile="$(VSToolsPath)\TypeScript\TypeScript.tasks.dll" />
<PropertyGroup>
<CompileDependsOn>
CompileTypeScript;
$(CompileDependsOn);
</CompileDependsOn>
<PublishPipelineCollectFilesCore>
$(PublishPipelineCollectFilesCore);
CompileTypeScript;
</PublishPipelineCollectFilesCore>
<CleanDependsOn>
$(CleanDependsOn);
TypeScriptClean
</CleanDependsOn>
<BuiltProjectOutputGroupDependsOn>
CompileTypeScript;
$(BuiltProjectOutputGroupDependsOn);
</BuiltProjectOutputGroupDependsOn>
</PropertyGroup>
<PropertyGroup>
<GetCopyToOutputDirectoryItemsDependsOn>
$(GetCopyToOutputDirectoryItemsDependsOn);
GetTypeScriptCopyToOutputDirectoryItems;
</GetCopyToOutputDirectoryItemsDependsOn>
</PropertyGroup>
<PropertyGroup>
<CfgPropertyPagesGuidsAddCSharp>{d4683cae-88c4-4b85-863d-ac8014f3ba36}</CfgPropertyPagesGuidsAddCSharp>
<CfgPropertyPagesGuidsAddVB>{d4683cae-88c4-4b85-863d-ac8014f3ba36}</CfgPropertyPagesGuidsAddVB>
<CfgPropertyPagesGuidsAddTypeScript>{d4683cae-88c4-4b85-863d-ac8014f3ba36}</CfgPropertyPagesGuidsAddTypeScript>
</PropertyGroup>
<PropertyGroup>
<!-- Indicates to the language service that this project supports TypeScript -->
<TypeScriptEnabled>true</TypeScriptEnabled>
<!-- Controls Compile-on-Save in the IDE -->
<TypeScriptCompileOnSaveEnabled Condition="'$(TypeScriptCompileOnSaveEnabled)' == ''">true</TypeScriptCompileOnSaveEnabled>
</PropertyGroup>
<PropertyGroup Condition="'$(TypeScriptBuildConfigurations)' == ''">
<PreferredUILang Condition="'$(BuildingInsideVisualStudio)' == 'true' and '$(PreferredUILang)' == ''">$([System.Globalization.CultureInfo]::CurrentUICulture.Name)</PreferredUILang>
<TypeScriptBuildConfigurations Condition="'$(TypeScriptRemoveComments)' == 'true'">$(TypeScriptBuildConfigurations) --removeComments</TypeScriptBuildConfigurations>
<TypeScriptBuildConfigurations Condition="'$(TypeScriptNoImplicitAny)' == 'true'">$(TypeScriptBuildConfigurations) --noImplicitAny</TypeScriptBuildConfigurations>
<TypeScriptBuildConfigurations Condition="'$(TypeScriptGeneratesDeclarations)' == 'true'">$(TypeScriptBuildConfigurations) --declaration</TypeScriptBuildConfigurations>
<TypeScriptBuildConfigurations Condition="'$(TypeScriptModuleKind)' != '' and '$(TypeScriptModuleKind)' != 'none'">$(TypeScriptBuildConfigurations) --module $(TypeScriptModuleKind)</TypeScriptBuildConfigurations>
<TypeScriptBuildConfigurations Condition="'$(TypeScriptOutFile)' != ''">$(TypeScriptBuildConfigurations) --out "$(TypeScriptOutFile)"</TypeScriptBuildConfigurations>
<TypeScriptBuildConfigurations Condition="'$(TypeScriptOutDir)' != ''">$(TypeScriptBuildConfigurations) --outDir "$(TypeScriptOutDir)"</TypeScriptBuildConfigurations>
<TypeScriptBuildConfigurations Condition="'$(TypeScriptSourceMap)' == 'true'">$(TypeScriptBuildConfigurations) --sourcemap</TypeScriptBuildConfigurations>
<TypeScriptBuildConfigurations Condition="'$(TypeScriptTarget)' != ''">$(TypeScriptBuildConfigurations) --target $(TypeScriptTarget)</TypeScriptBuildConfigurations>
<TypeScriptBuildConfigurations Condition="'$(TypeScriptNoResolve)' == 'true'">$(TypeScriptBuildConfigurations) --noResolve</TypeScriptBuildConfigurations>
<TypeScriptBuildConfigurations Condition="'$(TypeScriptAdditionalFlags)' != ''">$(TypeScriptBuildConfigurations) $(TypeScriptAdditionalFlags)</TypeScriptBuildConfigurations>
<TypeScriptBuildConfigurations Condition="'$(TypeScriptMapRoot)' != ''">$(TypeScriptBuildConfigurations) --mapRoot "$(TypeScriptMapRoot)"</TypeScriptBuildConfigurations>
<TypeScriptBuildConfigurations Condition="'$(TypeScriptSourceRoot)' != ''">$(TypeScriptBuildConfigurations) --sourceRoot "$(TypeScriptSourceRoot)"</TypeScriptBuildConfigurations>
<TypeScriptBuildConfigurations Condition="'$(TypeScriptCodePage)' != ''">$(TypeScriptBuildConfigurations) --codepage $(TypeScriptCodePage)</TypeScriptBuildConfigurations>
<TypeScriptBuildConfigurations Condition="'$(TypeScriptCharset)' != ''">$(TypeScriptBuildConfigurations) --charset $(TypeScriptCharset)</TypeScriptBuildConfigurations>
<TypeScriptBuildConfigurations Condition="'$(TypeScriptEmitBOM)' == 'true'">$(TypeScriptBuildConfigurations) --emitBOM</TypeScriptBuildConfigurations>
<TypeScriptBuildConfigurations Condition="'$(TypeScriptNoLib)' == 'true'">$(TypeScriptBuildConfigurations) --noLib</TypeScriptBuildConfigurations>
<TypeScriptBuildConfigurations Condition="'$(TypeScriptPreserveConstEnums)' == 'true'">$(TypeScriptBuildConfigurations) --preserveConstEnums</TypeScriptBuildConfigurations>
<TypeScriptBuildConfigurations Condition="'$(TypeScriptSuppressImplicitAnyIndexErrors)' == 'true'">$(TypeScriptBuildConfigurations) --suppressImplicitAnyIndexErrors</TypeScriptBuildConfigurations>
<!-- noEmitOnError default is 'true', this ensures a proper incremental build behavior, where outputs are not generated in the presence of an error. -->
<TypeScriptBuildConfigurations Condition="'$(TypeScriptNoEmitOnError)' != 'false'">$(TypeScriptBuildConfigurations) --noEmitOnError</TypeScriptBuildConfigurations>
<TypeScriptBuildConfigurations Condition="'$(PreferredUILang)' != ''">$(TypeScriptBuildConfigurations) --locale $(PreferredUILang)</TypeScriptBuildConfigurations>
</PropertyGroup>
<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>
<ItemGroup>
<ProjectCapability Include="TypeScript" />
</ItemGroup>
<Target Name="PreComputeCompileTypeScript">
<VsTsc
ToolPath="$(TscToolPath)"
ToolExe="$(TscToolExe)"
Configurations="$(TypeScriptBuildConfigurations) COMPUTE_PATHS_ONLY"
FullPathsToFiles="@(TypeScriptCompile)"
YieldDuringToolExecution="$(TscYieldDuringToolExecution)"
OutFile="$(TypeScriptOutFile)"
OutDir="$(TypeScriptOutDir)"
ProjectDir="$(ProjectDir)"
ToolsVersion ="$(TypeScriptToolsVersion)"
>
<Output TaskParameter="GeneratedJavascript" ItemName="GeneratedJavascript" />
</VsTsc>
<AssignTargetPath Files="@(GeneratedJavascript)" RootFolder="$(MSBuildProjectDirectory)">
<Output TaskParameter="AssignedFiles" ItemName="GeneratedJavascriptWithTargetPath" />
</AssignTargetPath>
<ItemGroup>
<FilesForPackagingFromProject Include="@(GeneratedJavascriptWithTargetPath->'%(Identity)')"/>
<ContentWithTargetPath Include="@(GeneratedJavascriptWithTargetPath->'%(Identity)')"/>
<Content Include="@(GeneratedJavascript->'%(Identity)')"/>
</ItemGroup>
</Target>
<Target Name="CompileTypeScript" Condition="'$(BuildingProject)' != 'false'" DependsOnTargets="PreComputeCompileTypeScript" Inputs="@(TypeScriptCompile)" Outputs="@(GeneratedJavascript)">
<VsTsc
ToolPath="$(TscToolPath)"
ToolExe="$(TscToolExe)"
Configurations="$(TypeScriptBuildConfigurations)"
FullPathsToFiles="@(TypeScriptCompile)"
YieldDuringToolExecution="$(TscYieldDuringToolExecution)"
OutFile="$(TypeScriptOutFile)"
OutDir="$(TypeScriptOutDir)"
ProjectDir="$(ProjectDir)"
ToolsVersion ="$(TypeScriptToolsVersion)"
>
<Output TaskParameter="GeneratedJavascript" ItemName="GeneratedJavascript" />
</VsTsc>
</Target>
<Target Name="GetTypeScriptCopyToOutputDirectoryItems">
<AssignTargetPath Files="@(TypeScriptCompile)" RootFolder="$(MSBuildProjectDirectory)">
<Output TaskParameter="AssignedFiles" ItemName="TypeScriptCompileWithTargetPath" />
</AssignTargetPath>
<Message Text="Adding items with BuildAction=TypeScriptCompile to the same collections that will be populated (with items of other BuildActions) by the GetCopyToOutputDirectoryItems target"/>
<ItemGroup>
<AllItemsFullPathWithTargetPath Include="@(TypeScriptCompileWithTargetPath->'%(FullPath)')" Condition="'%(TypeScriptCompileWithTargetPath.CopyToOutputDirectory)'=='Always' or '%(TypeScriptCompileWithTargetPath.CopyToOutputDirectory)'=='PreserveNewest'"/>
<_SourceItemsToCopyToOutputDirectoryAlways Include="@(TypeScriptCompileWithTargetPath->'%(FullPath)')" Condition="'%(TypeScriptCompileWithTargetPath.CopyToOutputDirectory)'=='Always'"/>
<_SourceItemsToCopyToOutputDirectory Include="@(TypeScriptCompileWithTargetPath->'%(FullPath)')" Condition="'%(TypeScriptCompileWithTargetPath.CopyToOutputDirectory)'=='PreserveNewest'"/>
</ItemGroup>
</Target>
<Target Name="TypeScriptClean" DependsOnTargets="PreComputeCompileTypeScript">
<Delete Files="@(GeneratedJavascript)" />
</Target>
</Project>
|
Had the same issue, both with VS 2015 Preview and CTP5. After installing VS2015, I get this error both in VS2013 and VS2015. It is resolved by running repair on TypeScript 1.4 |
Having the same issue after installing VS 2015 Preview and CTP5.
I´d be in need of a workaround, if any. |
Found out why the error occurs but not what provoked it upon installing VS 2015 Preview and CTP5 in the file
which builds a while in the file
which builds a correct |
I just installed CTP6 that was release yesterday and I didn't experience the same problem. After upgrade, TypeScript still works |
Repairing TypeScript 1.4 from Control Pane/Uninstall Programs solves this problem. But having to restart the machine is just ridiculous. |
Thanks for the update. I'll see what I can do about the restarts, but that may be a limitation of the setup components we're using... |
This should be fixed in the next version we release. |
@paulvanbrenk Hi, Is this problem fixed i am again getting this error in VS 2015 ( Asp.net Core ) I am using Typescript 1.8 |
@jakobehn It didn't resolved by repairing Typescript 1.8 . I even Reinstalled it Then Again Repaired it But error is still there |
I have reinstalled it from control panel and Error is still there . I am using Typescript 1.8 . I am thinking It should have been fixed . Not sure if I am making any mistake |
@paulvanbrenk This Error Only Came When I Use Asp.net Core |
@bhallaheemanshu is there a TypeScriptToolsVersion in the project file, if not can add it and set it to 1.8 (See the TypeScript HTML Application if you're unsure). |
@paulvanbrenk I tried adding 1.8 in 1.8 But that didn't worked . Actually tsc.exe was missing on my side . But weird thing is i tried installing Typescript again with One Restart of my Box and unistall But it was not generating again tsc.exe Then I got that From Other Box and it fluently fixed it . |
I experienced the same here. After installing typescript 1.8 the folder C:\Program Files (x86)\Microsoft SDKs\TypeScript\1.8 contains 38 files with tsc.exe missing. Copying the tsc.exe from a different machine fixes the issue. Maybe a hint: I have a user with limited rights and to install typescript i was using a different account with admin rights. Windows 7, domain joined |
consider using the nuget package instead. |
I have solved the 1.8 issue (missing tsc.exe) having nodejs installed globally on my machine and creating the file tsc.cmd in the path "C:\Program Files (x86)\Microsoft SDKs\TypeScript\1.8" with this content
then I have changed "C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\TypeScript\Microsoft.TypeScript.targets" and "C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v12.0\TypeScript\Microsoft.TypeScript.targets" replacing
with
|
Hi,
I installed Visual Studio 2015 CTP 5, added a brand new TypeScript project and I get this error.
The folder
C:\Program Files (x86)\Microsoft SDKs\TypeScript
looks like this:I've tried a "Repair" on the VS 2015 install, but that didn't fix anything. (On an aside, before repair the file
C:\Program Files (x86)\Microsoft SDKs\TypeScript\1.4\tsc.exe
was missing; the repair installed that file.)The relevant sections of the projects configuration for the (brand new) TypeScript project look like this:
Points to note: MSBuild is not looking for the version folder in
C:\Program Files (x86)\Microsoft SDKs\TypeScript
spite ofTypeScriptToolsVersion
being set to1.4
.How do I fix this?
The text was updated successfully, but these errors were encountered: