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
Hello. I am currently developing an application using .NET 7.0 because of Native AOT.
While trying to optimize string garbage using ZString, it worked fine in the debug environment, but crashed when built with Native AOT.
After receiving the ZString source code and building it myself, I checked the warning message and it said that using Enum.GetValues() is not compatible with Native AOT.
I think you should use Enum.GetValuesAsUnderlyingType() (added in .NET 7.0) or just use ToString().
The text was updated successfully, but these errors were encountered:
Hello. I am currently developing an application using
.NET 7.0
because ofNative AOT
.While trying to optimize string garbage using
ZString
, it worked fine in the debug environment, but crashed when built withNative AOT
.After receiving the
ZString
source code and building it myself, I checked the warning message and it said that usingEnum.GetValues()
is not compatible withNative AOT
.I think you should use
Enum.GetValuesAsUnderlyingType()
(added in.NET 7.0
) or just useToString()
.The text was updated successfully, but these errors were encountered: