I am trying to upgrade a .NET 4.5 project using the Upgrade Wizard. However, when I attempt to use the wizard I am getting a message saying "No distribution available for your project" and there aren't any versions listed in the dropdown.
I downloaded the ASP.NET MCV 2024.4.1112. Am I missing something?
I have attached a photo of the message I am receiving.
1 Answer, 1 is accepted
Hello Trena,
Thank you for providing details and the attached image.
I noticed that your project targets .NET Framework 4.5. With our Q2 release we have changed the target framework of the main Telerik UI for ASP.NET MVC assembly to 4.6.2. This was done to improve security and is mentioned in the product release notes. You can refer to this link: Telerik UI for ASP.NET MVC 2024.2.514 (2024 Q2). Here are the breaking changes:
In order to this, we have changed the logic in the Upgrade Wizard to list distributions supported by the target framework of the project. This message appears when either the target framework of the project or the MVC version is not compatible. In other words, if you are trying to upgrade a project that targets a version lower than 4.6.2 the latest distribution will not be listed.
If you have any other questions, please do not hesitate to write back.
Regards,
Maria
Progress Telerik
Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.
The project's target framework should either be updated, or you need to download a distribution older than 2024.2.514. The manual upgrade also is not an option. Because you can't put the 4.6.2 assembly in .NET 4.5 project.
Thanks Maria.
I updated the project's target framework to 4.8 and then I did the upgrade using the Upgrade Wizard.
Now I am getting the following error.
I have been doing some research and tried resolving the issue.
However, I haven't been able to resolve the issue.
Could not load file or assembly 'Kendo.Mvc, Version=2017.2.504.440, Culture=neutral, PublicKeyToken=121fae78165ba3d4' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.Exception Details: System.IO.FileLoadException: Could not load file or assembly 'Kendo.Mvc, Version=2017.2.504.440, Culture=neutral, PublicKeyToken=121fae78165ba3d4' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
Source Error:
|
Source File: C:\Users\tbumbray\Documents\PPW-LatestVersion-91522\PPW\PPW\App_Start\RouteConfig.cs Line: 16
Assembly Load Trace: The following information can be helpful to determine why the assembly 'Kendo.Mvc, Version=2017.2.504.440, Culture=neutral, PublicKeyToken=121fae78165ba3d4' could not be loaded.
|
Stack Trace:
|
Hello Trena,
Thank you for the provided information.
The error on the staging server says that there is still a reference to the old 2017.2.504.440 assembly. Please check your web.config and update the reference to match the version of the newly deployed assembly.
I hope this helps. Let me know If this resolves the issue.
Hi Maria,
Thanks for your help.
I am having a different kind of issue now. I think I may be missing some files because although I don't have any errors all of the Kendo UI components throughout the entire project are not working correctly.
I have reviewed the projects source code and compared it to the examples. They seem to be okay.
I am attaching a picture of the main page before upgrading and after upgrading.
Here is the CommonTabStrip.cshtml code:
@{ var parentRouteValues = ViewContext.RouteData.Values; int selectedTab = 0; if (parentRouteValues["controller"].ToString() == "Participants") { selectedTab = 0; } if (parentRouteValues["controller"].ToString() == "Contacts") { selectedTab = 1; } else if (parentRouteValues["controller"].ToString() == "Referral") { selectedTab = 2; } else if (parentRouteValues["controller"].ToString() == "coordinators" || parentRouteValues["controller"].ToString() == "Coordinators") { selectedTab = 3; } else if (parentRouteValues["controller"].ToString() == "ResourceNeeds") { selectedTab = 4; } else if (parentRouteValues["controller"].ToString() == "CarePlans") { selectedTab = 5; } else if (parentRouteValues["controller"].ToString() == "ResourceContacts") { selectedTab = 6; } //else if (parentRouteValues["controller"].ToString() == "RecoverySuppReferrals") //{ // selectedTab = 6; //} else if (parentRouteValues["controller"].ToString() == "ReportManager" && parentRouteValues["action"].ToString() == "List" || parentRouteValues["action"].ToString() == "Create" && parentRouteValues["controller"].ToString() == "ReportManager") { selectedTab = 7; } //else if (parentRouteValues["controller"].ToString() == "RecoverySuppReferrals") //{ // selectedTab = 6; //} else if (parentRouteValues["controller"].ToString() == "ReportManager" && parentRouteValues["action"].ToString() == "ViewReport") { selectedTab = 8; } else if (parentRouteValues["controller"].ToString() == "ReportManager" && parentRouteValues["action"].ToString() == "CustomReport") { selectedTab = 9; } }@(Html.Kendo().TabStrip() .Name("tabStrip1") .Items(items => { items.Add().Text("Participant").Action("Index", "Participants"); items.Add().Text("Outreach").Action("MainIndex", "Contacts"); items.Add().Text("Referrals").Action("MainIndex", "Referral"); items.Add().Text("Coordinators").Action("Index", "Coordinators").Visible(System.Web.HttpContext.Current.Session["RoleName"] != null && System.Web.HttpContext.Current.Session["RoleName"].ToString() == "Administrator" || System.Web.HttpContext.Current.Session["RoleName"] != null && System.Web.HttpContext.Current.Session["RoleName"].ToString() == "Supervisor"); items.Add().Text("Resource Needs").Action("Index", "ResourceNeeds"); items.Add().Text("Care Plan").Action("Index", "CarePlans"); items.Add().Text("Resource Contacts").Action("Index", "ResourceContacts"); //items.Add().Text("RecoverySupport").Action("Index", "RecoverySuppReferrals"); items.Add().Text("Upload Reports").Action("List", "ReportManager").Visible(System.Web.HttpContext.Current.Session["RoleName"] != null && System.Web.HttpContext.Current.Session["RoleName"].ToString() == "Administrator"); //items.Add().Text("View Custom Reports").Action("ViewReport", "ReportManager").Visible(System.Web.HttpContext.Current.Session["RoleName"] != null && System.Web.HttpContext.Current.Session["RoleName"].ToString() == "Administrator" /*|| System.Web.HttpContext.Current.Session["RoleName"] != null && System.Web.HttpContext.Current.Session["RoleName"].ToString() == "Supervisor"*/); items.Add().Text("View Reports").Action("CustomReport", "ReportManager").Visible(System.Web.HttpContext.Current.Session["RoleName"] != null && System.Web.HttpContext.Current.Session["RoleName"].ToString() == "Administrator" /*|| System.Web.HttpContext.Current.Session["RoleName"] != null && System.Web.HttpContext.Current.Session["RoleName"].ToString() == "Supervisor"*/); }).SelectedIndex(@selectedTab))
Also, most of the pages have data but the formatting is still off.
The attached screenshot shows that the kendo theme is not properly applied. This could be due to different reasons, for instance:
1.
An old incompatible theme version is referenced. For version
2024.4.1112 of the components, the compatible theme version is 10.0.1.
2. There are multiple theme style sheets referenced in the Layout
Please ensure that:
The following 3 files referenced in the project are version 2024.4.1112:
kendo.all.min.js
kendo.aspnetmvc.min.js
Kendo.Mvc.dll
and that a single theme file is referenced and it is version 10.0.1.
Here is an example of properly referenced client-side resources in the _Layout.cshtml <head> tag:
@* a single compatible theme style sheet should be referenced *@
<link href="https://kendo.cdn.telerik.com/themes/10.0.1/default/default-main.css" rel="stylesheet" type="text/css" />
@* add the index.css style sheet, if you are using kendo font icons *@
<link rel="stylesheet" href="https://unpkg.com/%40progress/kendo-font-icons/dist/index.css" />
@* for jQuery use the official jQuery CDN, because it is no longer distributed through the Kendo CDN *@
<script src="https://code.jquery.com/jquery-3.7.0.min.js"></script>
<script src="https://cdn.kendostatic.com/2024.4.1112/js/kendo.all.min.js"></script>
<script src="https://cdn.kendostatic.com/2024.4.1112/js/kendo.aspnetmvc.min.js"></script>
Hi Ivan,
IT WORKED!!!!! Thanks so much!
However, now I am having an issue with the license. I have added the license to the main scripts folder .(/Scripts) and added the script reference.
Adding the script reference has removed the watermark from some of the pages but not all. Am I supposed to add the script reference to every cshtml page?
Thanks again!
Hi Trena,
The license script must be added after the kendo scripts:
<script src="https://kendo.cdn.telerik.com/2024.4.1112/kendo.all.min.js"></script>
<script src="https://kendo.cdn.telerik.com/2024.4.1112/kendo.aspnetmvc.min.js"></script>
<script src="~/kendo-ui-license.js"></script>
Normally this is done in the <head> tag of the Layout.cshtml.
If you are using multiple layout files and loading the kendo scripts in them, add the license everywhere you load the kendo.all.min.js and the kendo.aspnetmvc.min.js files.
Sometimes kendo scripts are referenced directly in the views, e.g., when using Kendo UI for jQuery. Again, in such cases the license reference should follow the references of the kendo script files, if such are present in the view.
Trena,
You are welcome. Glad to hear the suggested changes worked out.