This is a migrated thread and some comments may be shown as answers.

Clarification for .NET Core 3.0 Official Release

2 Answers 130 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Reid
Top achievements
Rank 2
Reid asked on 30 Oct 2019, 11:27 AM

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 Answers, 1 is accepted

Sort by
0
Accepted
Veselin Tsvetanov
Telerik team
answered on 04 Nov 2019, 07:27 AM

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.
0
Reid
Top achievements
Rank 2
answered on 28 Nov 2019, 02:53 PM
Thank you for clarifying this.  The issue was indeed the JSON serialization settings.

Best wishes
Tags
General Discussions
Asked by
Reid
Top achievements
Rank 2
Answers by
Veselin Tsvetanov
Telerik team
Reid
Top achievements
Rank 2
Share this question
or