This is a migrated thread and some comments may be shown as answers.
Install ASP.NET Core UI manually, still uncorrect
3 Answers 19 Views
This is a migrated thread and some comments may be shown as answers.
K'Library
Top achievements
Rank 1
K'Library asked on 14 May 2019, 08:18 AM

Hi, 

I follow https://docs.telerik.com/aspnet-core/getting-started/getting-started this instruction to create a new asp.net core 2.1 mvc project to test Telerik UI for Asp.net Core version 2019.1.220

I installed client resource manually following https://docs.telerik.com/aspnet-core/getting-started/getting-started-copy-client-resources#manual-installation . But the browsers console showed kendo js errors. I was sure I followed the instructions correctly, I don't know why it didn't work. 

I zipped the codes and attached the download url in this thread:

https://celiawestus2.blob.core.windows.net/publics/test/WebApplication1.7z 

Could anyone help to solve this problem?

3 Answers, 1 is accepted

Sort by
0
Accepted
Ivan Danchev
Telerik team
answered on 16 May 2019, 04:08 PM
Hi,

The cause for the exception you are experiencing is jQuery being loaded twice in the project's _Layout.cshtml. It is loaded once in the head tag:
<environment include="Development"
        <script src="~/lib/jquery/dist/jquery.js"></script>
 
        @* Place Kendo UI scripts after jQuery *@
        <script src="~/lib/kendo-ui/js/kendo.all.min.js"></script>
        <script src="~/lib/kendo-ui/js/kendo.aspnetmvc.min.js"></script>
</environment>

and a second time at the end of the body:
<environment include="Development">
    <script src="~/lib/jquery/dist/jquery.js"></script>
    <script src="~/lib/bootstrap/dist/js/bootstrap.js"></script>
    <script src="~/js/site.js" asp-append-version="true"></script>
</environment>

The same is valid for the environment tags with exclude="Development" attribute:
<environment exclude="Development">
...
</environment>

Loading jQuery multiple times should be avoided - it must be added only once on the page before the Kendo UI scripts.

Leaving only the first reference to jQuery in the project's Layout deals with the js exception

Regards,
Ivan Danchev
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
0
K'Library
Top achievements
Rank 1
answered on 17 May 2019, 01:38 AM

Thanks, Visual Studio 2017 default asp.net core mvc templates contained this jquery.js.

I saw that there was jQuery 3 or jQuery 2 in different examples. Which version of jQuery should I use for Telerik's control? If I want to keep compatible with default asp.net core mvc templates. 

0
Ivan Danchev
Telerik team
answered on 21 May 2019, 10:38 AM
Hi,

You can find the list of supported jQuery versions per release in this documentation section. By default Core projects use jQuery 3.3.1, which is supported since R2 2018. 

Regards,
Ivan Danchev
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Asked by
K'Library
Top achievements
Rank 1
Answers by
Ivan Danchev
Telerik team
K'Library
Top achievements
Rank 1
Share this question
or