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
12 Answers, 1 is accepted
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
Hello,
As I understood, I can't use 2018.2.620 with Core 3, am I correct?
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
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
Hi Zoran,
The issue observed was due to the fact that the project was using a version of Telerik UI for ASP.NET Core which does not support .Net Core 3.0. The same issue would be present for .Net Core 3.1 too. That is why I would suggest you check the Telerik UI version used in the app. It should be R1 2020.1.114 or newer.
Regards,
Veselin Tsvetanov
Progress Telerik
Hi Veselin,
Creating the new project in Visual Studio 2019 using Asp.net Core 3.1.....I am facing this issue 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.1.11.0, Culture=neutral, PublicKeyToken=adb9793829ddae60'.)'....
Please help on this. Its quit urgent one.
Hello,
May I ask you to tell me which version of Telerik UI for ASP.NET Core you are creating the project with? Also, can you send me the newly created corrupt application, so I can review it locally?
Regards,
Veselin Tsvetanov
Progress Telerik
Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.
Hi,
The issue observed is due to the fact that the project is using a version of a package that is not supported by Progress (note the owner):
https://www.nuget.org/packages/Kendo.for.AspNet.Core/
You should use the Telerik.UI.for.AspNet.Core package with version 2020.1.114 or newer. Here are some further details on how to reference packages from the Telerik private NuGet feed:
https://docs.telerik.com/aspnet-core/installation/nuget-install
Regards,
Veselin Tsvetanov
Progress Telerik
Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.
Hello, Jerry,
As I can see from the provided screenshot the Telerik Nuget feed is not selected as a Package Source. Please refer to the following documentation article demonstrating how to set up the Telerik Nuget feed, in order to be able to use the needed packages:
https://docs.telerik.com/aspnet-core/installation/nuget-install#setup-the-telerik-nuget-feed
Hope this would help.
Regards,
Nencho
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.
Hello,
As my colleague Vesselin mentioned - You should use the Telerik.UI.for.AspNet.Core package. As I can see, you are attempting to search for Kendo UIForASP.NET Core. while the package name is Telerik UI for ASP.NET Core.
Could you please try again and let me know if the package is still not visible?
Regards,
Nencho
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.
Hello,
We've double-checked the license that you have associated with the email that you are submitting this thread (jeyarani.rajadurai@nttdata.com) and you do have an active license associated with it. Hence, if you went through the steps from the article below, the packages should be listed:
https://docs.telerik.com/aspnet-core/installation/nuget-install#setup-the-telerik-nuget-feed
First, I would suggest you double-check in YourAccount if you are able to see the needed Telerik UI for ASP.NET Core versions, available for manual download: https://www.telerik.com/account/product-download?product=UIASPCORE
If you are able to see them, that would confirm that there's no actual issue with the available versions for our account. That would suggest that there's an issue with the NugetSource setup. If that's the case, I would suggest you to remove the source that you've set up and add it again, following the article step by step:
https://docs.telerik.com/aspnet-core/installation/nuget-install#setup-the-telerik-nuget-feed
Please give it a try and let us know the results.
Regards,
Nencho
Progress Telerik
Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.
I am running into this error:
- Visual Studio 2019 with DotNet 5
- Created ASPNet Core MVC webapp
- Downloaded Kendo UI for aspnet Core installer, ran it.
- Added Telerik references to _ViewImports.cshtml and _Layout.cshtml, no love.
- In nuget, added telerik repository
- Typed Telerik.UI into nuget search and installed Kendo.for.AspNet.Core. That is the only component available to me?
- Project builds. When I run it I get the following:
Unhandled exception. System.AggregateException: 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=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60'.)
---> System.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=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60'.
---> System.TypeLoadException: Could not load type 'Microsoft.AspNetCore.Mvc.Internal.ClientValidatorCache' from assembly 'Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60'.
at System.Signature.GetSignature(Void* pCorSig, Int32 cCorSig, RuntimeFieldHandleInternal fieldHandle, IRuntimeMethodInfo methodHandle, RuntimeType declaringType)
at System.Reflection.RuntimeConstructorInfo.get_Signature()
at System.Reflection.RuntimeConstructorInfo.GetParametersNoCopy()
at System.Reflection.RuntimeConstructorInfo.GetParameters()
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteFactory.CreateConstructorCallSite(ResultCache lifetime, Type serviceType, Type implementationType, CallSiteChain callSiteChain)
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteFactory.TryCreateExact(ServiceDescriptor descriptor, Type serviceType, CallSiteChain callSiteChain, Int32 slot)
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteFactory.GetCallSite(ServiceDescriptor serviceDescriptor, CallSiteChain callSiteChain)
at Microsoft.Extensions.DependencyInjection.ServiceLookup.ServiceProviderEngine.ValidateService(ServiceDescriptor descriptor)
--- End of inner exception stack trace ---
at Microsoft.Extensions.DependencyInjection.ServiceLookup.ServiceProviderEngine.ValidateService(ServiceDescriptor descriptor)
at Microsoft.Extensions.DependencyInjection.ServiceProvider..ctor(IEnumerable`1 serviceDescriptors, IServiceProviderEngine engine, ServiceProviderOptions options)
--- End of inner exception stack trace ---
at Microsoft.Extensions.DependencyInjection.ServiceProvider..ctor(IEnumerable`1 serviceDescriptors, IServiceProviderEngine engine, 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()
Thoughts? I told my PM that Kendo would improve my productivity and I can't even get the trial license to work...
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
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