Upgrade Wizard: No distribution available for your project

1 Answer 122 Views
General Discussions
Trena
Top achievements
Rank 1
Trena asked on 22 Nov 2024, 02:36 PM

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

Sort by
0
Maria
Telerik team
answered on 26 Nov 2024, 11:40 AM

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.

Trena
Top achievements
Rank 1
commented on 26 Nov 2024, 02:16 PM

Thanks for your response.  Does that mean I will have to complete the upgrade manually?
Maria
Telerik team
commented on 27 Nov 2024, 11:43 AM

Hello Trena, 

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.
Trena
Top achievements
Rank 1
commented on 27 Nov 2024, 07:02 PM

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:
Line 14:             routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
Line 15:             routes.IgnoreRoute("{resource}.aspx/{*pathInfo}");
Line 16:             routes.MapMvcAttributeRoutes(); //provides attribute routing. 
Line 17:             routes.MapRoute(
Line 18:                 name: "Default",

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.
WRN: Assembly binding logging is turned OFF.
To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
Note: There is some performance penalty associated with assembly bind failure logging.
To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].

Stack Trace:
[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)]
   System.Signature.GetSignature(Void* pCorSig, Int32 cCorSig, RuntimeFieldHandleInternal fieldHandle, IRuntimeMethodInfo methodHandle, RuntimeType declaringType) +0
   System.Reflection.RuntimeMethodInfo.get_ReturnType() +63
   System.Web.Mvc.Async.AsyncActionMethodSelector.GetActionDescriptorDelegate(MethodInfo entryMethod) +60
   System.Web.Mvc.Routing.AttributeRoutingMapper.GetActionDescriptors(ReflectedAsyncControllerDescriptor controller) +132
   System.Web.Mvc.Routing.AttributeRoutingMapper.AddRouteEntries(SubRouteCollection collector, IEnumerable`1 controllerTypes, IInlineConstraintResolver constraintResolver, IDirectRouteProvider directRouteProvider) +163
   System.Web.Mvc.Routing.AttributeRoutingMapper.MapAttributeRoutes(RouteCollection routes, IEnumerable`1 controllerTypes, IInlineConstraintResolver constraintResolver, IDirectRouteProvider directRouteProvider) +101
   PPW.RouteConfig.RegisterRoutes(RouteCollection routes) in C:\Users\tbumbray\Documents\PPW-LatestVersion-91522\PPW\PPW\App_Start\RouteConfig.cs:16
   PPW.MvcApplication.Application_Start() in C:\Users\tbumbray\Documents\PPW-LatestVersion-91522\PPW\PPW\Global.asax.cs:22

 

 

Maria
Telerik team
commented on 28 Nov 2024, 11:24 AM

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.

Trena
Top achievements
Rank 1
commented on 06 Dec 2024, 07:20 PM | edited

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.

Ivan Danchev
Telerik team
commented on 11 Dec 2024, 12:52 PM

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>
Please give this a try and in case the issue persists, post the application's Layout for further review.
Trena
Top achievements
Rank 1
commented on 11 Dec 2024, 08:01 PM

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!

Ivan Danchev
Telerik team
commented on 13 Dec 2024, 03:47 PM

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
Top achievements
Rank 1
commented on 14 Dec 2024, 02:19 AM

Hi Ivan,

It worked!  

Thanks!

Ivan Danchev
Telerik team
commented on 18 Dec 2024, 03:17 PM

Tags
General Discussions
Asked by
Trena
Top achievements
Rank 1
Answers by
Maria
Telerik team
Share this question
or