Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

About .NET 7.0 Support #87

Closed
daramkun opened this issue Apr 10, 2023 · 0 comments
Closed

About .NET 7.0 Support #87

daramkun opened this issue Apr 10, 2023 · 0 comments

Comments

@daramkun
Copy link
Contributor

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().

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants