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

update compile condition #446

Merged
merged 1 commit into from
Oct 27, 2024

Conversation

WeihanLi
Copy link
Contributor

@WeihanLi WeihanLi commented Oct 27, 2024

Since we're targeting for netstandard2.0/net8.0, update to #if NET to avoid changes in future target framework updates

@rabbitism
Copy link
Member

Enum.GetValuesAsUnderlyingType only works for 7+. Is this feasible?

@WeihanLi
Copy link
Contributor Author

WeihanLi commented Oct 27, 2024

NET is only defined for net5.0+, not defined for netstandard2.0, see details here: https://learn.microsoft.com/en-us/dotnet/standard/frameworks#preprocessor-symbols

When we pack the package, there're two library/dll generated for netstandard2.0 and net8.0, this can be found from the produced nupkg file, and net8.0 dll would only be used when the project is using net8.0+

image

And when we decompile the netstandard2.0 dll, it would still behave like before

image

same as before in net8.0 dll

image

@rabbitism rabbitism merged commit 8e98ae6 into irihitech:main Oct 27, 2024
@WeihanLi WeihanLi deleted the update-compile-condition branch October 27, 2024 05:27
@rabbitism rabbitism added this to the October release milestone Oct 30, 2024
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

Successfully merging this pull request may close these issues.

2 participants