Clarification for .NET Core 3.0 Official Release

3 posts, 1 answers
  1. Reid
    Reid avatar
    448 posts
    Member since:
    Oct 2008

    Posted 30 Oct 2019 Link to this post

    I have converted our solution in the last couple of days from .NET Core 2.2 to 3.0.

    The last component to integrate is Kendo.Core UI MVC.  The ASP.NET site compiles and runs, including the WebAPI project but the grids are not rendering data.  And we have a lot of grids in a lot of templates.  None work.  In the debugger you can see that the following statement in the *_Read methods have data, the dsResult.Data has data ans no errors but the data does not show.

    var dsResult = result.ToDataSourceResult(request);
                return Json(dsResult);

    This is using 2019.3.0123.

    I also opened up a working POC prototype basic Kendo application that worked fine in 2.2, showing data.  This was created about 6 months ago using the wizard in VS 2017.  I am now using VS 2019. 

    The project  dynamically creates the data for the read method, simple as could be.  But after upgrading the project to.NET Core 3.0 the data fails to show.  Again the debugger shows the result to the request formed fine.  So I suspect the issue is in the binding to the grid.


    Can someone at Progress shed some light on this?

    If you look at the link below it is states, 

    "With the Telerik R3 2019 release, you will be better equipped to continue doing just that. We are so proud to release the all-new Telerik UI for Blazor, which is packed with more than 25 brand-new native components!"
    In addition, we are happy to announce that our component .NET toolsets are fully compliant with the upcoming .NET Core 3.0 and are coming with tons of new controls and improvements.  

    https://www.telerik.com/blogs/telerik-and-kendo-ui-r3-release-2019-is-here!

    Thanks

     

  2. Answer
    Veselin Tsvetanov
    Admin
    Veselin Tsvetanov avatar
    1241 posts

    Posted 04 Nov 2019 Link to this post

    Hello Reid,

    I suppose that the issue faced is caused by the fact that in .Net Core 3.0 the Newtonsoft.Json package is no longer included by default. Instead, the application would use the System.Text.Json assembly. That would also lead to the fact that all field names will be translated from PascalCase to camelCase when sent from server to the client. In order to avoid that, you should explicitly turn off that serialization option:

    services
        .AddMvc(options => options.EnableEndpointRouting = false)
        .SetCompatibilityVersion(CompatibilityVersion.Version_3_0)
        .AddJsonOptions(options => options.JsonSerializerOptions.PropertyNamingPolicy = null);

    If the above does not help, I would like to ask you to send us the sample template solution, where you have observed the issue in question. This way we will be able to troubleshoot the problem locally and to provide you with the most appropriate assistance on that case.

    I hope that this helps.

    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. Reid
    Reid avatar
    448 posts
    Member since:
    Oct 2008

    Posted 28 Nov 2019 Link to this post

    Thank you for clarifying this.  The issue was indeed the JSON serialization settings.

    Best wishes
Back to Top