jsakamoto / Toolbelt.Blazor.I18nText

The class library that provides the ability to localize texts on your Blazor app!
Mozilla Public License 2.0
247 stars 24 forks source link

Blazor preview6 -- > preview7 :Json library breaking changes #4

Closed Psimatrix closed 5 years ago

Psimatrix commented 5 years ago

In my project I am getting

"Unhandled exception. Mono.Linker.MarkException: Error processing method: 'System.Void Toolbelt.Blazor.I18nText.I18nText/d__16`1::MoveNext()' in assembly: 'Toolbelt.Blazor.I18nText.dll'"

There seems to be a breaking change in Json libraries used. To summarize

preview6 ==> Preview7 1) Json librarySystem.Text.Json.Serialization => System.Text.Json 2) JsonSerializer.Parse => JsonSerializer.Deserialize 3) JsonSerializer.ToString => JsonSerializer.Serialize

Psimatrix commented 5 years ago

I've confirmed that the issue can be simply updated with changes in the I18nText.cs

JsonSerializer.Parse --> .Deserialize

and updating to latest latest preview version

in project file.

jsakamoto commented 5 years ago

Thank you for your reporting! It is very very helpful for me.

Just now, I published new version of "Blazor I18n Text" NuGet package for support Blazor v.3.0 Preview 7.

I could not fix this issue without your report.

Thanks!