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

Changes in net6.0 Serialization Throws Exception in SfGrid

Greetings Team Syncfusion,

I have upgraded my solution to the new `net6.0` framework and have attempted to load my Blazor server-side application with it.

It appears that the serialization mechanism has changed in .NET6, as now I am experiencing an exception thrown in SfGrid when it attempts to render:

```

 System.InvalidOperationException: The converter specified on 'Syncfusion.Blazor.Grids.GridColumn.EditTemplate' does not derive from JsonConverter or have a public parameterless constructor.

   at System.Text.Json.ThrowHelper.ThrowInvalidOperationException_SerializationConverterOnAttributeInvalid(Type classType, MemberInfo memberInfo)

   at System.Text.Json.JsonSerializerOptions.GetConverterFromAttribute(JsonConverterAttribute converterAttribute, Type typeToConvert, Type classTypeAttributeIsOn, MemberInfo memberInfo)

   at System.Text.Json.JsonSerializerOptions.DetermineConverter(Type parentClassType, Type runtimePropertyType, MemberInfo memberInfo)

   at System.Text.Json.Serialization.Metadata.JsonTypeInfo.GetConverter(Type type, Type parentClassType, MemberInfo memberInfo, Type& runtimeType, JsonSerializerOptions options)

   at System.Text.Json.Serialization.Metadata.JsonTypeInfo.AddProperty(MemberInfo memberInfo, Type memberType, Type parentClassType, Boolean isVirtual, Nullable`1 parentTypeNumberHandling, JsonSerializerOptions options)

   at System.Text.Json.Serialization.Metadata.JsonTypeInfo..ctor(Type type, JsonConverter converter, Type runtimeType, JsonSerializerOptions options)

   at System.Text.Json.JsonSerializerOptions.<InitializeForReflectionSerializer>g__CreateJsonTypeInfo|112_0(Type type, JsonSerializerOptions options)

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

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

   at System.Text.Json.Serialization.JsonCollectionConverter`2.OnTryWrite(Utf8JsonWriter writer, TCollection value, 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.TryWriteAsObject(Utf8JsonWriter writer, Object value, 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.WriteUsingSerializer[TValue](Utf8JsonWriter writer, TValue& value, JsonTypeInfo jsonTypeInfo)

   at System.Text.Json.JsonSerializer.WriteStringUsingSerializer[TValue](TValue& value, JsonTypeInfo 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)

```


Looking at the  `Syncfusion.Blazor.Grids.GridColumn.EditTemplate` it looks like such:

```

[Parameter]

    [System.ComponentModel.DefaultValue(null)]

    [JsonIgnore]

    [JsonPropertyName("editTemplate")]

    [JsonConverter(typeof (TemplateConverter))]

    public RenderFragment<object> EditTemplate { get; set; }

```

The first thing to note which I find interesting is that it is decorated with an `JsonIgnore` attribute but is still being processed.  Nonetheless, the other interesting aspect -- and the one causing the exception -- is that `TemplateConverter` inherits from `Newtonsoft.Json.JsonConverter` and not `System.Text.Json.JsonConverter`.


Somehow this is working in .NET5, but not .NET6.

If you have any suggestions on how to remedy this (especially if you have a new version compatible with .NET6 😁) it would be greatly appreciated.


Thank you for any assistance/consideration you can lend,

Michael


14 Replies 1 reply marked as answer

RN Rahul Narayanasamy Syncfusion Team August 17, 2021 01:58 PM UTC

Hi Mike-E, 

Greetings from Syncfusion. 

Query: Changes in net6.0 Serialization Throws Exception in SfGrid 

We have validated your query and checked the problem by preparing a simple sample in .net6.0 with Grid EditTemplate feature. We could not able to reproduce the problem while running the sample in .net6.0. Find the below sample for your reference. 


Also, we need more details regarding your reported problem. Could you please share the below details. It will be helpful to validate and provide a better solution. 

  • Full Grid code snippets.
  • Reproduce the problem in the provided sample and revert back to us.
  • Share a simple reproduceable sample with video demonstration of the problem.

Regards, 
Rahul 



MI Mike-E August 19, 2021 11:25 AM UTC

Wow! Thank you for such a quick reply @Rahul. I unfortunately did not see it until now as I did not get a notification.


I did try your solution (thank you so much for taking the time to make it!), but unfortunately I get the same exception:

```

Microsoft.AspNetCore.Components.Server.Circuits.RemoteRenderer: Warning: Unhandled exception rendering component: The converter specified on 'Syncfusion.Blazor.Grids.GridColumn.EditTemplate' does not derive from JsonConverter or have a public parameterless constructor.


System.InvalidOperationException: The converter specified on 'Syncfusion.Blazor.Grids.GridColumn.EditTemplate' does not derive from JsonConverter or have a public parameterless constructor.

at System.Text.Json.ThrowHelper.ThrowInvalidOperationException_SerializationConverterOnAttributeInvalid(Type classType, MemberInfo memberInfo)

at System.Text.Json.JsonSerializerOptions.GetConverterFromAttribute(JsonConverterAttribute converterAttribute, Type typeToConvert, Type classTypeAttributeIsOn, MemberInfo memberInfo)

at System.Text.Json.JsonSerializerOptions.DetermineConverter(Type parentClassType, Type runtimePropertyType, MemberInfo memberInfo)

at System.Text.Json.Serialization.Metadata.JsonTypeInfo.GetConverter(Type type, Type parentClassType, MemberInfo memberInfo, Type& runtimeType, JsonSerializerOptions options)

at System.Text.Json.Serialization.Metadata.JsonTypeInfo.AddProperty(MemberInfo memberInfo, Type memberType, Type parentClassType, Boolean isVirtual, Nullable`1 parentTypeNumberHandling, JsonSerializerOptions options)

at System.Text.Json.Serialization.Metadata.JsonTypeInfo.CacheMember(Type declaringType, Type memberType, MemberInfo memberInfo, Boolean isVirtual, Nullable`1 typeNumberHandling, Boolean& propertyOrderSpecified, Dictionary`2& ignoredMembers)

at System.Text.Json.Serialization.Metadata.JsonTypeInfo..ctor(Type type, JsonConverter converter, Type runtimeType, JsonSerializerOptions options)

at System.Text.Json.JsonSerializerOptions.g__CreateJsonTypeInfo|108_0(Type type, JsonSerializerOptions options)

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

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

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

at System.Text.Json.Serialization.JsonCollectionConverter`2.OnTryWrite(Utf8JsonWriter writer, TCollection value, 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.TryWriteAsObject(Utf8JsonWriter writer, Object value, 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](JsonConverter jsonConverter, Utf8JsonWriter writer, TValue& value, JsonSerializerOptions options, WriteStack& state)

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

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

at System.Text.Json.JsonSerializer.Write[TValue](TValue& value, Type runtimeType, JsonSerializerOptions options)

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)

Microsoft.AspNetCore.Components.Server.Circuits.CircuitHost: Error: Unhandled exception in circuit '-TVfJuXxSjam9gOTWmFkRHQCdN9loXfp8FKtkBZAdEg'.


System.AggregateException: One or more errors occurred. (The converter specified on 'Syncfusion.Blazor.Grids.GridColumn.EditTemplate' does not derive from JsonConverter or have a public parameterless constructor.)

---> System.InvalidOperationException: The converter specified on 'Syncfusion.Blazor.Grids.GridColumn.EditTemplate' does not derive from JsonConverter or have a public parameterless constructor.

at System.Text.Json.ThrowHelper.ThrowInvalidOperationException_SerializationConverterOnAttributeInvalid(Type classType, MemberInfo memberInfo)

at System.Text.Json.JsonSerializerOptions.GetConverterFromAttribute(JsonConverterAttribute converterAttribute, Type typeToConvert, Type classTypeAttributeIsOn, MemberInfo memberInfo)

at System.Text.Json.JsonSerializerOptions.DetermineConverter(Type parentClassType, Type runtimePropertyType, MemberInfo memberInfo)

at System.Text.Json.Serialization.Metadata.JsonTypeInfo.GetConverter(Type type, Type parentClassType, MemberInfo memberInfo, Type& runtimeType, JsonSerializerOptions options)

at System.Text.Json.Serialization.Metadata.JsonTypeInfo.AddProperty(MemberInfo memberInfo, Type memberType, Type parentClassType, Boolean isVirtual, Nullable`1 parentTypeNumberHandling, JsonSerializerOptions options)

at System.Text.Json.Serialization.Metadata.JsonTypeInfo.CacheMember(Type declaringType, Type memberType, MemberInfo memberInfo, Boolean isVirtual, Nullable`1 typeNumberHandling, Boolean& propertyOrderSpecified, Dictionary`2& ignoredMembers)

at System.Text.Json.Serialization.Metadata.JsonTypeInfo..ctor(Type type, JsonConverter converter, Type runtimeType, JsonSerializerOptions options)

at System.Text.Json.JsonSerializerOptions.g__CreateJsonTypeInfo|108_0(Type type, JsonSerializerOptions options)

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

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

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

at System.Text.Json.Serialization.JsonCollectionConverter`2.OnTryWrite(Utf8JsonWriter writer, TCollection value, 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.TryWriteAsObject(Utf8JsonWriter writer, Object value, 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](JsonConverter jsonConverter, Utf8JsonWriter writer, TValue& value, JsonSerializerOptions options, WriteStack& state)

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

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

at System.Text.Json.JsonSerializer.Write[TValue](TValue& value, Type runtimeType, JsonSerializerOptions options)

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)

--- End of inner exception stack trace ---

[2021-08-19T11:11:14.918Z] Error: System.AggregateException: One or more errors occurred. (The converter specified on 'Syncfusion.Blazor.Grids.GridColumn.EditTemplate' does not derive from JsonConverter or have a public parameterless constructor.)

---> System.InvalidOperationException: The converter specified on 'Syncfusion.Blazor.Grids.GridColumn.EditTemplate' does not derive from JsonConverter or have a public parameterless constructor.

at System.Text.Json.ThrowHelper.ThrowInvalidOperationException_SerializationConverterOnAttributeInvalid(Type classType, MemberInfo memberInfo)

at System.Text.Json.JsonSerializerOptions.GetConverterFromAttribute(JsonConverterAttribute converterAttribute, Type typeToConvert, Type classTypeAttributeIsOn, MemberInfo memberInfo)

at System.Text.Json.JsonSerializerOptions.DetermineConverter(Type parentClassType, Type runtimePropertyType, MemberInfo memberInfo)

at System.Text.Json.Serialization.Metadata.JsonTypeInfo.GetConverter(Type type, Type parentClassType, MemberInfo memberInfo, Type& runtimeType, JsonSerializerOptions options)

at System.Text.Json.Serialization.Metadata.JsonTypeInfo.AddProperty(MemberInfo memberInfo, Type memberType, Type parentClassType, Boolean isVirtual, Nullable`1 parentTypeNumberHandling, JsonSerializerOptions options)

at System.Text.Json.Serialization.Metadata.JsonTypeInfo.CacheMember(Type declaringType, Type memberType, MemberInfo memberInfo, Boolean isVirtual, Nullable`1 typeNumberHandling, Boolean& propertyOrderSpecified, Dictionary`2& ignoredMembers)

at System.Text.Json.Serialization.Metadata.JsonTypeInfo..ctor(Type type, JsonConverter converter, Type runtimeType, JsonSerializerOptions options)

at System.Text.Json.JsonSerializerOptions.g__CreateJsonTypeInfo|108_0(Type type, JsonSerializerOptions options)

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

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

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

at System.Text.Json.Serialization.JsonCollectionConverter`2.OnTryWrite(Utf8JsonWriter writer, TCollection value, 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.TryWriteAsObject(Utf8JsonWriter writer, Object value, 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](JsonConverter jsonConverter, Utf8JsonWriter writer, TValue& value, JsonSerializerOptions options, WriteStack& state)

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

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

at System.Text.Json.JsonSerializer.Write[TValue](TValue& value, Type runtimeType, JsonSerializerOptions options)

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)

--- End of inner exception stack trace ---

[2021-08-19T11:11:14.919Z] Information: Connection disconnected.

```


Can you verify that you are using the latest RC1 SDK?

https://github.com/dotnet/installer#installers-and-binaries


I am also using Visual Studio 2022 Preview 3.1. 


The SDK version and IDE version are the only two variables that I can think of that would be the difference here.  I will continue to think of any others and post here accordingly.



RN Rahul Narayanasamy Syncfusion Team August 20, 2021 02:51 PM UTC

Hi Mike-E, 

Thanks for the update. 

We have checked your shared information and we need some details to check the reported problem further at our end. Could you please share the below details. It will be helpful to validate and provide a better solution. 

  • Could you please share your dotnet info details? Please type the below command(dotnet --info) in command prompt(CMD) and share the details.
Command: dotnet --info 
  • Share your .csproj details.
  • Share .csproj target framework details.
 
Regards, 
Rahul  



MI Mike-E August 20, 2021 05:39 PM UTC

Thank you for your reply @Rahul.


Here is my dotnet --info:

```> dotnet --info

.NET SDK (reflecting any global.json):

 Version: 6.0.100-rc.1.21416.1

 Commit: 215a2f6332


Runtime Environment:

 OS Name: Windows

 OS Version: 10.0.19043

 OS Platform: Windows

 RID: win10-x64

 Base Path: C:\Program Files\dotnet\sdk\6.0.100-rc.1.21416.1\


Host (useful for support):

  Version: 6.0.0-rc.1.21414.4

  Commit: 6c39236e9f


.NET SDKs installed:

  3.1.302 [C:\Program Files\dotnet\sdk]

  6.0.100-preview.6.21355.2 [C:\Program Files\dotnet\sdk]

  6.0.100-preview.7.21379.14 [C:\Program Files\dotnet\sdk]

  6.0.100-rc.1.21416.1 [C:\Program Files\dotnet\sdk]


.NET runtimes installed:

  Microsoft.AspNetCore.All 2.1.13 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]

  Microsoft.AspNetCore.All 2.1.17 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]

  Microsoft.AspNetCore.All 2.2.7 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]

  Microsoft.AspNetCore.App 2.1.13 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]

  Microsoft.AspNetCore.App 2.1.17 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]

  Microsoft.AspNetCore.App 2.2.7 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]

  Microsoft.AspNetCore.App 3.0.0-preview7.19365.7 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]

  Microsoft.AspNetCore.App 6.0.0-preview.7.21378.6 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]

  Microsoft.AspNetCore.App 6.0.0-rc.1.21413.12 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]

  Microsoft.NETCore.App 2.1.9 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]

  Microsoft.NETCore.App 2.1.13 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]

  Microsoft.NETCore.App 2.1.17 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]

  Microsoft.NETCore.App 2.2.7 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]

  Microsoft.NETCore.App 3.0.0-preview5-27626-15 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]

  Microsoft.NETCore.App 5.0.1 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]

  Microsoft.NETCore.App 6.0.0-preview.7.21377.19 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]

  Microsoft.NETCore.App 6.0.0-rc.1.21414.4 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]

  Microsoft.WindowsDesktop.App 6.0.0-preview.7.21378.9 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]

  Microsoft.WindowsDesktop.App 6.0.0-rc.1.21414.3 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]


To install additional .NET runtimes or SDKs:

  https://aka.ms/dotnet-download


```


As far as csproj is concerned, I opened the one you sent earlier with the SampleLatest-35104715.zip file and encountered this same exception.  If there is further information you require from that csproj please do let me know and I will do my best to assist you.


Here is the csproj in its entirety as it sits on my machine:

```

<Project Sdk="Microsoft.NET.Sdk.Web">


  <PropertyGroup>

    <TargetFramework>net6.0</TargetFramework>

    <Nullable>enable</Nullable>

  </PropertyGroup>


  <ItemGroup>

    <PackageReference Include="Syncfusion.Blazor" Version="19.2.0.56" />

  </ItemGroup>


</Project>


```



MI Mike-E August 22, 2021 08:43 PM UTC

Hi Rahul,


I can confirm that switching between preview-7 and rc1 (or rc2 made available this weekend) changes the behavior, with preview-7 working, and the others not.


I have filed this here:

https://developercommunity.visualstudio.com/t/net-sdk-rc-produces-exception-in-syncfusion-contro/1510479


Please feel free to add to the discussion if needed. :)



RN Rahul Narayanasamy Syncfusion Team August 23, 2021 11:18 AM UTC

Hi Mike-E,  
 
Thanks for sharing the details. 
 
We have validated your query and we have confirmed it as a bug and logged the defect report Serialization exception throws in SfGrid while upgrading to latest .net version with EditTemplate” for the same. Thank you for taking the time to report this issue and helping us improve our product. At Syncfusion, we are committed to fixing all validated defects (subject to technological feasibility and Product Development Life Cycle) and including the defect fix in our weekly release which is expected to be rolled out by the end of September, 2021.   
        
You can now track the current status of your request, review the proposed resolution timeline, and contact us for any further inquiries through this link.  
       
  
Regards,  
Rahul 


Marked as answer

MI Mike-E August 23, 2021 11:29 AM UTC

Excellent, thank you for all your efforts out there, Rahul and team!



RN Rahul Narayanasamy Syncfusion Team August 24, 2021 05:06 AM UTC

Hi Mike-E, 
 
Thanks for the update. 
 
We will let you know once the fix is included and the release rolled out successfully. Until then we appreciate your patience. 
 
Regards, 
Rahul 



EK Enejda Koljaka September 17, 2021 08:10 PM UTC

Hi,

is there any update on this? We have 2 full dev teams working on an upcoming release that are currently blocked because of this issue. It is extremely critical for us.

If it helps it seems that the breaking change has occurred with this PR:

https://github.com/dotnet/runtime/commit/91021fe27b1b845f51ff29cfd47b2405fa91b683#diff-814722ef5303e65815d350762206450b283510f6246b658047c4dffd31c97920L59-L64

Thanks you,

Enejda



MS MS September 20, 2021 08:30 AM UTC

Same issue here, seems to be broken since .NET 6 RC1.



RN Rahul Narayanasamy Syncfusion Team September 20, 2021 11:32 AM UTC

Hi Enejda & MiVision, 

We understand your situation. We have prioritized the issue and currently working on this with high priority. The fix will be available in the upcoming release(Volume 3) which is expected to be rolled out by the end of September 2021. Until then we appreciate your patience.  
 
Regards, 
Rahul 



MI Mike-E September 24, 2021 09:46 AM UTC

FWIW a decent workaround was posted in the bugtracker:

---


Chris commented on Sep 24, 2021 1:25 AM

@John P.

As a workaround you can install Preview 7 SDK (Net 6.0.100-preview.7.21379.14 from here: https://dotnet.microsoft.com/download/dotnet/6.0 )
Add a
global.json File to the root of your project and add the following to the content:

{ "sdk": {"version": "6.0.100-preview.7.21379.14" }}

Chris




RN Rahul Narayanasamy Syncfusion Team September 27, 2021 11:40 AM UTC

Hi Mike-E, 
 
Thanks for the update. 
 
If the provided suggestion in the feedback makes the application works for you, then kindly use the solution until our Volume 3 release. As we said in our previous update, the fix for the issue will be rolled out by the end of September, 2021. We will let you know once the fix is included and the release rolled out successfully. Until then we appreciate your patience. 
 
Regards, 
Rahul 




RN Rahul Narayanasamy Syncfusion Team October 4, 2021 12:49 PM UTC


Hi All,  
 
We are glad to announce that our 2021 Volume 3 release v19.3.0.43  is rolled out.  
 
 
We have resolved the reported issue “Serialization exception throws in SfGrid while upgrading to latest .net version” in this release. So please upgrade to our latest version for latest fixes and features. 
 
 
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, 
Rahul 


Loader.
Up arrow icon