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

Preprocessor symbol 'NET' should be automatically defined when building for .NET 5 or higher #13511

Closed
terrajobst opened this issue Sep 10, 2020 · 5 comments

Comments

@terrajobst
Copy link
Member

Relevant portion from the spec:

  • We continue to define NETCOREAPP for backwards compatibility with existing #if code.
  • Moving forward we'll use NET as the versionless symbol (for .NET Framework we used NETFRAMEWORK, so no conflict there).
  • We'll follow the rule-based creation in SDK-style projects which takes the friendly TFM name without the OS flavor, makes it upper-case and replaces special characters with an underscore.
  • For OS flavors we'll do the same, i.e. create versionless as well as version specific symbols.
@sfoslund
Copy link
Member

@terrajobst is there a repro for a scenario where you're not seeing these symbols produced? They should have been added with #11635 and #12124.

@marcpopMSFT
Copy link
Member

That's on me as I swear I tested it and it didn't work but I tried it again now and see NET is defined so I think this can be closed.

@marcpopMSFT
Copy link
Member

BTW, confirmed working in RC1

@sfoslund
Copy link
Member

Closing per Marc's comment

@Maxyeah
Copy link

Maxyeah commented Mar 10, 2022

What about the "OS flavored" preprocessors like NET6_0_WINDOWS. I don´t get these to work. When will these implemented?

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

4 participants