Could not load type 'Microsoft.AspNetCore.Mvc.Internal.ClientValidatorCache' from assembly 'Microsoft.AspNetCore.Mvc.Core, Version=6.0.0.0 - kendo-ui

I was using Kendo UI for asp.net core 2.1 application. I had to upgrade asp.net core 2.1 to asp.net core 6. I had to change startup.cs file and upgrade multiple packages. Now I am getting this error which says "Could not load type 'Microsoft.AspNetCore.Mvc.Internal.ClientValidatorCache' from assembly 'Microsoft.AspNetCore.Mvc.Core, Version=6.0.0.0"
enter image description here

Related

Kendo for .net Core 3.1

I try to use Kendo in my Razor Pages app, I followed this doc https://docs.telerik.com/aspnet-core/getting-started/first-steps, but I have error:
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=3.1.7.0, Culture=neutral, PublicKeyToken=adb9793829ddae60'.)'
I'm using Telerik.UI.for.AspNet.Core, version 2019.1.220.
I'm going to add my comment as an answer, because this Telerik thread confirms (and references the same error you are encountering) that you'll need a later version of Kendo to have support for .NET Core 3.1.
This quote here from the thread linked above - about .NET Core 3.0 requiring a later version than you are using:
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
R3 2019 is the first release that mentions full support for .NET Core 3.1.

Visual Studio 2019 16.3.6 ASP.NET Core Web Application project template does allow asp.net core version selection

I've just updated Visual Studio 2019 to 16.3.6 which includes the ASP.Net Core 3 SDK.
I create a new project from the ASP.NET Core Web Application project template. The previous version would let me pick the ASP.Net Core version (2,2.1,2.2). Now it does not, and defaults to creating the project using ASP.Net Core 2.2, not 3. Do I always need to manual upgrade every project I create or is there somewhat to bring back the version dropdown or set visual studio to default to Core 3?
I've got Core 3.0 SDK installed:
Then I choose ASP.NET Core Web Application
There are no other core related web projects to chose. Click Next
Then I configure the project There are no options for version, or authentication. I used to see those options prior to the upgrade.
The option is still there. I think you need to install .Net core 3 SDK.

ASP.Net Core 2.2: Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information

I recently started with ASP.Net Core 2.2. I have a situation where I need to use legacy SAP Connector library within my application. After some reading I created my application to target full .Net Framework 4.6.1. I have a test class that references the SAP Connector library.
However, when I run my application, it breaks within Startup.cs right where it calls this line:
app.UseMvc();
Checking the LoaderExceptions property, it shows the error:
Could not load file or assembly 'sapnco, Version=3.0.0.42, Culture=neutral, PublicKeyToken=50436dca5c7f7d23' or one of its dependencies. An attempt was made to load a program with an incorrect format.
My hunch is that although ASP.Net Core supports full .Net Framework, the referenced assembly has to go as far back to particular version of .Net Framework and no less. Although I can't find any concrete info on that.
Please help!
For SAP Connector, I think you need to contact SAP Forum Support to confirm if the SAP Connector .NET Core version is available or will be available.
From the perspective of .Net Core, I am afraid there are no connectors and no plans to develop such connectors.

Supporting an .Net Framework Lib in .Net Core 2.0 WebAPI - Error

so basicly out complete company dataaccess is based in .Net Framework 4.6.
We are only on windows, so no problems here atm.
We have a new project in which I want to use .Net Core 2.0 and WebAPI but I have to use this "old" .net Framework lib.
When I add the reference and start my project I will get an error:
Could not load type 'System.Security.Principal.WindowsImpersonationContext' from assembly 'mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'.'
As far as I googled it and understand, the dataasccess lib will try to get the win auth but this isnt available in .net core (obvious) any more.
I found the nuget Microsoft.Windows.Compatilibity and after installing the error is gone.
But another one comes up:
Exactly this error:https://community.oracle.com/thread/4139377
And the only solution to this seems to be to remove the MS.Win.Comp package...
So a bit of a circle.
Any ideas?

getting error while converting target framework of an asp.net web application from 2.0 to 3.5

While converting the taget framework of an asp.net web application from 2.0 to 3.5 in visual studio 2008, i am getting the error : Exception of type 'System.Runtime.InteropServices.ExternalException' was thrown
I solved the issue, my web application didn't have a web.config.I added a deafult web.config and then converted it.It worked fine.
I recently upgraded the target framework in the my web project's (Asp.NET web forms) properties from 4.8 to 4.8.1.
I searched the web.config for any "targetFramework" where it was referencing older versions and changed them to "4.8.1". Save. Recompile.

Resources