Could not load type 'Microsoft.AspNetCore.Mvc.Internal.ClientValidatorCache'

7 posts, 0 answers
  1. Jerry
    Jerry avatar
    3 posts
    Member since:
    Oct 2019

    Posted 24 Oct 2019 Link to this post

    Hi all,

    Is anyone else seeing the error below?  I get it at runtime when CreateHostBuilder(args).Build().Run() is called.

     

    System.AggregateException
      HResult=0x80131500
      Message=Some services are not able to be constructed (Error while validating the service descriptor 'ServiceType: Kendo.Mvc.Rendering.IKendoHtmlGenerator Lifetime: Transient ImplementationType: Kendo.Mvc.Rendering.KendoHtmlGenerator': Could not load type 'Microsoft.AspNetCore.Mvc.Internal.ClientValidatorCache' from assembly 'Microsoft.AspNetCore.Mvc.Core, Version=3.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60'.)
      Source=Microsoft.Extensions.DependencyInjection
      StackTrace:
       at Microsoft.Extensions.DependencyInjection.ServiceProvider..ctor(IEnumerable`1 serviceDescriptors, ServiceProviderOptions options)
       at Microsoft.Extensions.DependencyInjection.ServiceCollectionContainerBuilderExtensions.BuildServiceProvider(IServiceCollection services, ServiceProviderOptions options)
       at Microsoft.Extensions.DependencyInjection.DefaultServiceProviderFactory.CreateServiceProvider(IServiceCollection containerBuilder)
       at Microsoft.Extensions.Hosting.Internal.ServiceFactoryAdapter`1.CreateServiceProvider(Object containerBuilder)
       at Microsoft.Extensions.Hosting.HostBuilder.CreateServiceProvider()
       at Microsoft.Extensions.Hosting.HostBuilder.Build()
       at GariboldiApp.Program.Main(String[] args) in D:\Project Consultants\JV\git_work\Garibaldi\Gariboldi\GariboldiApp\Program.cs:line 16

    Inner Exception 1:
    InvalidOperationException: Error while validating the service descriptor 'ServiceType: Kendo.Mvc.Rendering.IKendoHtmlGenerator Lifetime: Transient ImplementationType: Kendo.Mvc.Rendering.KendoHtmlGenerator': Could not load type 'Microsoft.AspNetCore.Mvc.Internal.ClientValidatorCache' from assembly 'Microsoft.AspNetCore.Mvc.Core, Version=3.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60'.

    Inner Exception 2:
    TypeLoadException: Could not load type 'Microsoft.AspNetCore.Mvc.Internal.ClientValidatorCache' from assembly 'Microsoft.AspNetCore.Mvc.Core, Version=3.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60'.

     

    Many thanks!

    Jerry Tennison


  2. Veselin Tsvetanov
    Admin
    Veselin Tsvetanov avatar
    1178 posts

    Posted 29 Oct 2019 Link to this post

    Hi Jerry,

    I am afraid that we are not aware of an issue as the observed. Therefore, I would like to ask you to prepare and send us a small isolated runnable sample revealing the error observed. Please, remove any external dependencies from that and database calls (if any). Also remove any controllers, views, and models, which are not related to the problem. If you prefer to keep the sample project confidential, I would recommend you to open a support ticket on the same topic and upload the demo there.

    Regards,
    Veselin Tsvetanov
    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.
  3. Jerry
    Jerry avatar
    3 posts
    Member since:
    Oct 2019

    Posted 29 Oct 2019 Link to this post

    Hi Veselin,

    I posted a complete Visual Studio solution with this ticket.  It builds, but it does not run.

    Since I created the ticket, I have uninstalled and re-installed Visual Studio multiple times.  One thing that appears to be consistent is that the Azure workload must be installed with Visual Studio in order for a demo web app to work properly.  I do not remember seeing that anywhere in the required prerequisites, so it might be worthwhile for you guys to look into what is coming from the Azure workload that the Kendo UI components depend on.

    Best regards,

    Jerry Tennison

  4. Veselin Tsvetanov
    Admin
    Veselin Tsvetanov avatar
    1178 posts

    Posted 31 Oct 2019 Link to this post

    Hello Jerry,

    The Azure workload should not be required when running applications featuring Telerik UI for ASP.NET Core components. May I ask you to specify which demo application results in the above requirement?

    As per the error, you have initially opened the current thread for, that would be present when using an older version of Telerik UI for ASP.NET Core within a .Net Core 3.0 application. In order to avoid that you should make sure that the version of the Telerik package is the latest (2019.3.1023).

    I have also reviewed the support thread that you have opened on the same. Here is what I believe went wrong with the Telerik version. I noticed that your initial project references version 2018.3.911 of Telerik.UI.for.AspNet.Core.Trial package. That is the only version of the above package available on the public NuGet.org feed. I believe that you have included a reference from that source, instead of the latest trial available on the Telerik private NuGet feed. Here you will find some more info on how to set up the Telerik NuGet:

    https://docs.telerik.com/aspnet-core/getting-started/installation/nuget-install

    Regards,
    Veselin Tsvetanov
    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.
  5. Artem
    Artem avatar
    3 posts
    Member since:
    Apr 2017

    Posted 01 Nov 2019 in reply to Veselin Tsvetanov Link to this post

    Hello,

    As I understood, I can't use 2018.2.620 with Core 3, am I correct?

  6. Jerry
    Jerry avatar
    3 posts
    Member since:
    Oct 2019

    Posted 01 Nov 2019 in reply to Veselin Tsvetanov Link to this post

    Thanks Veselin, that may explain what I was seeing.

    I've gotten past the problem and I am not seeing that runtime error anymore, but I AM still seeing a thing or two that I have questions about.  I'll post separate tickets for those if I don't find the answers here in the forums.

    Thanks for your response!

    Jerry

  7. Veselin Tsvetanov
    Admin
    Veselin Tsvetanov avatar
    1178 posts

    Posted 05 Nov 2019 Link to this post

    Hello all,

    Artem, that is correct. Only the latest version of the UI for ASP.NET Core suite (2019.3.1023) offers official support for .Net Core 3.0.

    Jerry, feel free to contact us if you have any further questions on the .Net Core 3.0 integration.

    Regards,
    Veselin Tsvetanov
    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.
Back to Top