After moving a vs2013 project to vs2015 I get 117 errors when I ref <reference path="typings/kendo.all.d.ts"/> (telerik.kendoui.professional.2016.2.714.commercial) in my ts file (see screen shot).
7 Answers, 1 is accepted
Please ensure that the TypeScript definitions are referenced only once in the project.
In case the issue persist please send us a runnable sample where the issue is replicated. Thus, we will be able to examine the behavior locally and look for its cause.
Regards,
Vessy
Telerik by Progress

Hello Vessy
I've created a new mvc website, updated nuget packages and added scripts/typings/kendo.all.d.ts and scripts/site.ts (zipped project downloadable here: https://www.dropbox.com/s/ihnsrs7h7qeptfg/kendo_all_d_tsCompilationErrors.zip?dl=0).
When add /// <reference path="typings/kendo.all.d.ts"/> to the site.ts file (see attached screen shot) I get the 117 mentioned errors. I would like ts function drawDateOnChart to compile (kendo.all.d.ts ref needed).
What am I doing wrong?
/Morten
I tested the provided project and it builds without any errors on my side both without applying any changes to it and when removing the comment from the kendo.all.d.ts like follows:
///<
reference
path
=
"typings/kendo.all.d.ts"
/>
This is why I assume that the issue may be related to some cached configuration on your local machine. Can you try the following suggestions and see whether going through them will make a difference?
- Clean the Visual Studio solution and restart Visual Studio. Rebuild the solution.
- Clear the application cache.
- Clear the ASP.NET temporary files. The path to them should be similar to:
%windir%\Microsoft.NET\Framework\v2.0.50727
%windir%\Microsoft.NET\Framework\v4.0.30319
Looking forward to hearing from you,
Vessy
Telerik by Progress

I think you are right that the trouble is on my machine.
- I cleaned VS solution and re-build
- I cleaned C:\Users\[user]\AppData\Local\Temp\Temporary ASP.NET Files
(what do you mean by application cache?)
I think the trouble may be due to a wrong typescript version being used to compile ts files in my project.
The csproj file has the following entry in the propertyGroup section:
<TypeScriptToolsVersion>1.8</TypeScriptToolsVersion>
However, when build the project it appears version typescript version 1.4 is used:
1> Task Parameter:ComputeOutputOnly=False (TaskId:26)
1> C:\Program Files (x86)\Microsoft SDKs\TypeScript\1.4\tsc.exe --sourcemap --target ES5 --noEmitOnError --locale en-US "C:\Users\Morten\Documents\Visual Studio 2015\Projects\kendo_all_d_tsCompilationErrors\kendo_all_d_tsCompilationErrors\Scripts\site.ts" "C:\Users\Morten\Documents\Visual Studio 2015\Projects\kendo_all_d_tsCompilationErrors\kendo_all_d_tsCompilationErrors\Scripts\typings\jquery\jquery.d.ts" (TaskId:26)
1>C:\Users\Morten\Documents\Visual Studio 2015\Projects\kendo_all_d_tsCompilationErrors\kendo_all_d_tsCompilationErrors\Scripts\typings\kendo.all.d.ts(5,9): error TS1005: Build:';' expected.
1>C:\Users\Morten\Documents\Visual Studio 2015\Projects\kendo_all_d_tsCompilationErrors\kendo_all_d_tsCompilationErrors\Scripts\typings\kendo.all.d.ts(5,19): error TS1005: Build:';' expected.
1>C:\Users\Morten\Documents\Visual Studio 2015\Projects\kendo_all_d_tsCompilationErrors\kendo_all_d_tsCompilationErrors\Scripts\typings\kendo.all.d.ts(5,25): error TS1005: Build:';' expected.
1>C:\Users\Morten\Documents\Visual Studio 2015\Projects\kendo_all_d_tsCompilationErrors\kendo_all_d_tsCompilationErrors\Scripts\typings\kendo.all.d.ts(248,5): error TS1129: Build:Statement expected.
1>C:\Users\Morten\Documents\Visual Studio 2015\Projects\kendo_all_d_tsCompilationErrors\kendo_all_d_tsCompilationErrors\Scripts\typings\kendo.all.d.ts(363,1): error TS1128: Build:Declaration or statement expected.
1>C:\Users\Morten\Documents\Visual Studio 2015\Projects\kendo_all_d_tsCompilationErrors\kendo_all_d_tsCompilationErrors\Scripts\typings\kendo.all.d.ts(365,9): error TS1005: Build:';' expected.
1>C:\Users\Morten\Documents\Visual Studio 2015\Projects\kendo_all_d_tsCompilationErrors\kendo_all_d_tsCompilationErrors\Scripts\typings\kendo.all.d.ts(365,19): error TS1005: Build:';' expected.
1>C:\Users\Morten\Documents\Visual Studio 2015\Projects\kendo_all_d_tsCompilationErrors\kendo_all_d_tsCompilationErrors\Scripts\typings\kendo.all.d.ts(365,33): error TS1005: Build:';' expected.
1>C:\Users\Morten\Documents\Visual Studio 2015\Projects\kendo_all_d_tsCompilationErrors\kendo_all_d_tsCompilationErrors\Scripts\typings\kendo.all.d.ts(369,5): error TS1129: Build:Statement expected.
1>C:\Users\Morten\Documents\Visual Studio 2015\Projects\kendo_all_d_tsCompilationErrors\kendo_all_d_tsCompilationErrors\Scripts\typings\kendo.all.d.ts(464,1): error TS1128: Build:Declaration or statement expected.
1>C:\Users\Morten\Documents\Visual Studio 2015\Projects\kendo_all_d_tsCompilationErrors\kendo_all_d_tsCompilationErrors\Scripts\typings\kendo.all.d.ts(466,9): error TS1005: Build:';' expected.
1>C:\Users\Morten\Documents\Visual Studio 2015\Projects\kendo_all_d_tsCompilationErrors\kendo_all_d_tsCompilationErrors\Scripts\typings\kendo.all.d.ts(466,19): error TS1005: Build:';' expected.
1>C:\Users\Morten\Documents\Visual Studio 2015\Projects\kendo_all_d_tsCompilationErrors\kendo_all_d_tsCompilationErrors\Scripts\typings\kendo.all.d.ts(466,30): error TS1005: Build:';' expected.
1>C:\Users\Morten\Documents\Visual Studio 2015\Projects\kendo_all_d_tsCompilationErrors\kendo_all_d_tsCompilationErrors\Scripts\typings\kendo.all.d.ts(467,5): error TS1129: Build:Statement expected.
1>C:\Users\Morten\Documents\Visual Studio 2015\Projects\kendo_all_d_tsCompilationErrors\kendo_all_d_tsCompilationErrors\Scripts\typings\kendo.all.d.ts(508,15): error TS1005: Build:';' expected.
1>C:\Users\Morten\Documents\Visual Studio 2015\Projects\kendo_all_d_tsCompilationErrors\kendo_all_d_tsCompilationErrors\Scripts\typings\kendo.all.d.ts(508,23): error TS1005: Build:';' expected.
1>C:\Users\Morten\Documents\Visual Studio 2015\Projects\kendo_all_d_tsCompilationErrors\kendo_all_d_tsCompilationErrors\Scripts\typings\kendo.all.d.ts(1288,1): error TS1128: Build:Declaration or statement expected.
I have a stackoverflow question:
http://stackoverflow.com/questions/39145561/how-do-i-get-the-vs2015-web-project-to-build-my-typescript-files-using-typescrip
Could you try to see if compiling against ts v1.4 produce the same result at your end?
You can see detailed steps on how to clean the VS caches here: http://weblogs.asp.net/psheriff/clean-up-after-visual-studio.
As per your request, I compiled the application against ts v1.4 but did not produce the same result. You can see the video from my test here: http://screencast.com/t/EkER86CB
Can you verify that the version of the TypeScript.Tasks.dll is the same as shown at the beginning of my video?
In addition, I researched the problem further and step upon the following GitHub TypeScript issue, where a similar problem is discussed: https://github.com/Microsoft/TypeScript/issues/7781
Regards,
Vessy
Telerik by Progress

I updated the kendo_ui code to include c# razor comments and now the visual-studio 2017 compiler now ignores the “///” commented line.
/// @*<reference
path="typings/angular2/angular2.d.ts" />*@
/// @*<reference
path="typings/kendo-ui/kendo-ui.d.ts" />*@
In order to use the TypeScript definitions of the widgets you have to remove the @* *@ of the references as below:
/// <
reference
path
=
"typings/angular2/angular2.d.ts"
/>
/// <
reference
path
=
"typings/kendo-ui/kendo-ui.d.ts"
/>
You can refer the following help article for more details on the matter:
https://docs.telerik.com/kendo-ui/third-party/typescript
Regards,
Vessy
Progress Telerik