I am getting this error while building the application project file:
The target "PreComputeCompileTypeScript" does not exist in the project
Can some one point me to a solution?
Open Microsoft.TypeScript.targets
file located under C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v11.0\TypeScript
and add the following before </Project>
tag
<Target Name="PreComputeCompileTypeScript">
<VsTsc
ToolPath="$(TscToolPath)"
ToolExe="$(TscToolExe)"
Configurations="$(TypeScriptBuildConfigurations)"
FullPathsToFiles="@(TypeScriptCompile)"
YieldDuringToolExecution="$(TscYieldDuringToolExecution)"
OutFile="$(TypeScriptOutFile)"
OutDir="$(TypeScriptOutDir)"
ProjectDir="$(ProjectDir)">
<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>
Do you have Visual Studio 2012 and 2013 installed on the machine? Than it might be related to this issue here: https://social.msdn.microsoft.com/Forums/en-US/cf8db2ce-4a4d-4084-93a7-ca94c9bf6ce2/visual-studio-2013-update-3-breaks-typescript-for-visual-studio-2012?forum=vssetup
The solution/work-around is described in bottom of the thread.
just had similar issue with Visual Studio 2015, the path was like that:
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\ApacheCordovaTools\vs-mda-targets\Microsoft.TypeScript.MDA.targets
while it's enough to insert another one dummy target:
<!-- Overriding targets which when absent cause warnings from common targets -->
...
<Target Name="PreComputeCompileTypeScript" />
</Project>
that is because target "CompileTypeScript" depends on "PreComputeCompileTypeScript".
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With