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
From the page above, we should update the JsonObjectContract.GetUninitializedObject() function to use the following code:
internalobjectGetUninitializedObject(){// we should never get here if the environment is not fully trusted, check just in caseif(!JsonTypeReflector.FullyTrusted){thrownewJsonException("Insufficient permissions. Creating an uninitialized '{0}' type requires full trust.".FormatWith(CultureInfo.InvariantCulture,NonNullableUnderlyingType));}
#if NET5_0_OR_GREATERreturnSystem.Runtime.CompilerServices.RuntimeHelpers.GetUninitializedObject(NonNullableUnderlyingType);
#else
returnSystem.Runtime.Serialization.FormatterServices.GetUninitializedObject(NonNullableUnderlyingType);
#endif
}
The text was updated successfully, but these errors were encountered:
https://learn.microsoft.com/en-us/dotnet/fundamentals/syslib-diagnostics/syslib0050#workaround
From the page above, we should update the JsonObjectContract.GetUninitializedObject() function to use the following code:
The text was updated successfully, but these errors were encountered: