ToDataSourceResult: Can't load 'Microsoft.AspNetCore.Mvc.Abstractions`

2 posts, 0 answers
  1. Andrew
    Andrew avatar
    39 posts
    Member since:
    Dec 2010

    Posted 04 Dec 2019 Link to this post

    I am attempting to invoke the Kendo mvc extensions from an automated test.

    It builds fine, but at runtime I get an exception when I invoke Kendo.Mvc.Extensions.QueryableExtensions.ToDataSourceResult(...)


    DataSourceRequest request = CreateDefaultDataSourceRequest();
    var dataSourceResult = widgets.ToDataSourceResult(request);  // Exception thrown here


    The exception is:

    System.IO.FileNotFoundException : Could not load file or assembly 'Microsoft.AspNetCore.Mvc.Abstractions, Version=, Culture=neutral, PublicKeyToken=adb9793829ddae60'. The system cannot find the file specified.
       at Kendo.Mvc.Extensions.QueryableExtensions.ToDataSourceResult


    I am running this in both .NET Framework 4.6.2 and .NET Core 3.0. It works fine in .NET Framework, it's just the .NET Core build which fails.


    Here is the complete .csproj file:

    <?xml version="1.0" encoding="utf-8"?>
    <Project Sdk="Microsoft.NET.Sdk">
          <PackageReference Include="NUnit" Version="3.12.0" />
            <ProjectReference Include="..\DATMedia.Core\DATMedia.Core.csproj" />
        <ItemGroup Condition="'$(TargetFramework)' == 'net462'">
            <PackageReference Include="Telerik.UI.for.AspNet.Mvc5" Version="2019.3.1023" />
        <ItemGroup Condition="'$(TargetFramework)' == 'netcoreapp3.0'">
            <PackageReference Include="Telerik.UI.for.AspNet.Core" Version="2019.3.1023" />
        <!-- Some Googling suggested this would help, but nope.-->
        <ItemGroup Condition="'$(TargetFramework)' == 'netcoreapp3.0'">
            <FrameworkReference Include="Microsoft.AspNetCore.App" />





  2. Plamen
    Plamen avatar
    3080 posts

    Posted 09 Dec 2019 Link to this post


    I have tested the issue in a simple project but could not observe the described behavior.

    I am attaching it here - would you please try to modify it so we could observe the issue and be more helpful with a possible solution.

    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