We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Grid is not working in dotnet core 7

I am evaluating the new dot net core 7 RC1 along with syncfusion blazor, It throws the following exception when I am using Grid.


[2022-09-19T13:58:54.160Z] Error: System.InvalidOperationException: The converter specified on 'Syncfusion.Blazor.DataManager.Json' is not compatible with the type 'System.Collections.Generic.IEnumerable`1[System.Object]'.

   at System.Text.Json.ThrowHelper.ThrowInvalidOperationException_SerializationConverterOnAttributeNotCompatible(Type classTypeAttributeIsOn, MemberInfo memberInfo, Type typeToConvert)

   at System.Text.Json.Serialization.Metadata.DefaultJsonTypeInfoResolver.GetConverterFromAttribute(JsonConverterAttribute converterAttribute, Type typeToConvert, MemberInfo memberInfo, JsonSerializerOptions options)

   at System.Text.Json.Serialization.Metadata.ReflectionJsonTypeInfo`1.CreateProperty(Type typeToConvert, MemberInfo memberInfo, JsonSerializerOptions options, Boolean shouldCheckForRequiredKeyword)

   at System.Text.Json.Serialization.Metadata.ReflectionJsonTypeInfo`1.AddPropertiesAndParametersUsingReflection()

   at System.Text.Json.Serialization.Metadata.ReflectionJsonTypeInfo`1..ctor(JsonConverter converter, JsonSerializerOptions options)

   at System.Text.Json.Serialization.JsonConverter`1.CreateReflectionJsonTypeInfo(JsonSerializerOptions options)

   at System.Text.Json.Serialization.Metadata.DefaultJsonTypeInfoResolver.CreateJsonTypeInfo(Type type, JsonSerializerOptions options)

   at System.Text.Json.Serialization.Metadata.DefaultJsonTypeInfoResolver.GetTypeInfo(Type type, JsonSerializerOptions options)

   at System.Text.Json.JsonSerializerOptions.GetTypeInfoNoCaching(Type type)

   at System.Collections.Concurrent.ConcurrentDictionary`2.GetOrAdd(TKey key, Func`2 valueFactory)

   at System.Text.Json.JsonSerializerOptions.GetTypeInfoInternal(Type type, Boolean ensureConfigured, Boolean resolveIfMutable)

   at System.Text.Json.Serialization.Metadata.JsonPropertyInfo.Configure()

   at System.Text.Json.Serialization.Metadata.JsonTypeInfo.InitializePropertyCache()

   at System.Text.Json.Serialization.Metadata.JsonTypeInfo.Configure()

   at System.Text.Json.Serialization.Metadata.JsonTypeInfo.<EnsureConfigured>g__ConfigureLocked|138_0()

   at System.Text.Json.JsonSerializerOptions.GetTypeInfoInternal(Type type, Boolean ensureConfigured, Boolean resolveIfMutable)

   at System.Text.Json.Serialization.JsonConverter.ResolvePolymorphicConverter(Object value, JsonTypeInfo jsonTypeInfo, JsonSerializerOptions options, WriteStack& state)

   at System.Text.Json.Serialization.JsonConverter`1.TryWrite(Utf8JsonWriter writer, T& value, JsonSerializerOptions options, WriteStack& state)

   at System.Text.Json.Serialization.Converters.DictionaryDefaultConverter`3.OnWriteResume(Utf8JsonWriter writer, TDictionary value, JsonSerializerOptions options, WriteStack& state)

   at System.Text.Json.Serialization.JsonDictionaryConverter`3.OnTryWrite(Utf8JsonWriter writer, TDictionary dictionary, JsonSerializerOptions options, WriteStack& state)

   at System.Text.Json.Serialization.JsonConverter`1.TryWrite(Utf8JsonWriter writer, T& value, JsonSerializerOptions options, WriteStack& state)

   at System.Text.Json.Serialization.JsonConverter`1.WriteCore(Utf8JsonWriter writer, T& value, JsonSerializerOptions options, WriteStack& state)

   at System.Text.Json.JsonSerializer.WriteCore[TValue](Utf8JsonWriter writer, TValue& value, JsonTypeInfo`1 jsonTypeInfo)

   at System.Text.Json.JsonSerializer.WriteString[TValue](TValue& value, JsonTypeInfo`1 jsonTypeInfo)

   at System.Text.Json.JsonSerializer.Serialize[TValue](TValue value, JsonSerializerOptions options)

   at Syncfusion.Blazor.Grids.SfGrid`1.SerializeModel(SfGrid`1 comp)

   at Syncfusion.Blazor.Grids.SfGrid`1.OnAfterRenderAsync(Boolean firstRender)

   at Microsoft.AspNetCore.Components.RenderTree.Renderer.GetErrorHandledTask(Task taskToHandle, ComponentState owningComponentState)


9 Replies

SP Sarveswaran Palani Syncfusion Team September 20, 2022 06:38 PM UTC

Hi Jawaid,


Greetings from Syncfusion support.


We have analyzed your query and prepared sample based on your requirement using SfDataManager in .Net 7 version. But we’re unable to replicate the mentioned issue at our end. Kindly refer the attached sample and reproduce the reported issue in our provided sample. It’ll be more helpful for us to validate the query and provide the solution as early as possible.


Please get back to if you have any further queries.


Regards,

Sarveswaran PK



Attachment: SfGridDataManagerN7_b6c3dbfe.zip


FR Frodo September 20, 2022 09:46 PM UTC

Hi, I also get this exception.

I tried the attached sample and it gives the same exception.

Only change was nuget package upgrade to 7.0.0-rc.1.22427.2

 



SP Sarveswaran Palani Syncfusion Team September 22, 2022 01:45 AM UTC

Hi Jawaid,

Thanks for the update.

We are currently Validating the reported query at our end, and we will update the further details within two business days. Until then we appreciate your patience.

Regards,

Sarveswaran PK



JA Jawaid Akhter replied to Sarveswaran Palani September 23, 2022 05:24 AM UTC

I am sharing the sample code that I developed in Dot Net Core 7 RC1. I am just using a sample list binding with grid. still I am facing same issue.


https://github.com/jawaidakhter/GridDemoApp2.git





NE Nevin September 24, 2022 01:12 PM UTC

Hey! Just wanted to report a +1 on this. 


Should have thought to downgrade the SDK. Thanks!



SP Sarveswaran Palani Syncfusion Team September 26, 2022 06:32 PM UTC

Hi Jawaid,


Greetings from Syncfusion support.


We have analyzed your query and we would like to inform you that currently our Syncfusion components have only support for .NET6 version only. Hence the reported issue occur in while creating the application in .NET7. Reported issue will be resolved after upgrading our component to .NET 7.


Until then we appreciate your patience.


Regards,

Sarveswaran PK




SP Sarveswaran Palani Syncfusion Team October 6, 2022 05:44 PM UTC

Hi Pal,


Sorry for the inconvenience caused .


Recently we gave support to all our Components for compatible with .NET 7 Preview versions. But we have problems with serialization processes. Currently, we have checking with RC versions and need some more time to validate this. We update the further details two business days. since ensuring process take time to confirmation.


Kindly get back to us if you have any further queries


Regards,

Sarveswaran PK



SP Sarveswaran Palani Syncfusion Team October 11, 2022 05:48 PM UTC

Hi Jawaid,


We are glad to announce that, we have included fix for the serialization issue in our weekly patch release (20.3.0.49).  So please upgrade to our latest version of Syncfusion NuGet package to resolve the reported issue. Please find the Nuget package for latest fixes and features from below.


Nuget : https://www.nuget.org/packages/Syncfusion.Blazor.Grid


We thank you for your support and appreciate your patience in waiting for this release. Please get in touch with us if you would require any further assistance. 

   

Regards,            

Sarveswaran PK


Loader.
Live Chat Icon For mobile
Up arrow icon