You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After updating to 6.0.0 (I think it started with 6.0.0), I get the following exception when calling TZNames.GetDisplayNames() when my app is compiled with .NET Native (works fine in debug without .NET Native).
TimeZoneData.Load ()
System.Reflection.MissingMetadataException: This operation cannot be carried out because metadata for the following object was removed for performance reasons:\n\n EETypeRva:0x00003130\n\nNo further information is available. Rebuild in debug mode for better information.
This seems to be because TimeZoneNames is now using System.Text.Json, which seems to have problems with UWP .NET Native currently: dotnet/runtime#978
Workaround
As described in dotnet/runtime#978 (comment), in your UWP app's Properties/Default.rd.xml file, add the following namespace line for System.Text.Json.Serialization.Converters
Hope that helps some folks with the same issue! I think it could be possible for TimeZoneNames to include this declarative on behalf of System.Text.Json, but the right fix would be for Microsoft to fix that in the Json package itself. So I'm mostly posting this just as info for other users, feel free to close this if you'd like!
The text was updated successfully, but these errors were encountered:
Yeah, I've seen such things before with other projects. I don't publish a UWP-specific target though, so I don't think there's much I can do in this library. Thanks for sharing a workaround though! 👍
After updating to 6.0.0 (I think it started with 6.0.0), I get the following exception when calling
TZNames.GetDisplayNames()
when my app is compiled with .NET Native (works fine in debug without .NET Native).This seems to be because TimeZoneNames is now using System.Text.Json, which seems to have problems with UWP .NET Native currently: dotnet/runtime#978
Workaround
As described in dotnet/runtime#978 (comment), in your UWP app's
Properties/Default.rd.xml
file, add the following namespace line for System.Text.Json.Serialization.ConvertersHope that helps some folks with the same issue! I think it could be possible for TimeZoneNames to include this declarative on behalf of System.Text.Json, but the right fix would be for Microsoft to fix that in the Json package itself. So I'm mostly posting this just as info for other users, feel free to close this if you'd like!
The text was updated successfully, but these errors were encountered: