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

Automatically define preprocessor symbols for target platforms #11236

Closed
dsplaisted opened this issue Apr 10, 2020 · 2 comments · Fixed by #12124
Closed

Automatically define preprocessor symbols for target platforms #11236

dsplaisted opened this issue Apr 10, 2020 · 2 comments · Fixed by #12124
Assignees
Milestone

Comments

@dsplaisted
Copy link
Member

dsplaisted commented Apr 10, 2020

Spec is here: https://github.com/dotnet/designs/blob/master/accepted/2020/net5/net5.md#preprocessor-symbols

Note that this includes defining preprocessor symbols for the target platform, as well as defining preprocessor symbols for previous versions of .NET and the OS

@dsplaisted dsplaisted added this to the 5.0.1xx milestone Apr 10, 2020
@dsplaisted
Copy link
Member Author

@sfoslund Here's a piece of the .NET 5 work that I think you could pick up and implement now, if you are looking for something.

We don't yet parse the TargetPlatformIdentifier or TargetPlatformVersion out of the TargetFramework, but the preprocessor symbol logic shouldn't care, and you can just set the target platform properties directly in tests.

@sfoslund
Copy link
Member

#11635 implements target platform and NET backwards compatible preprocessor symbols. Outstanding work: adding backwards compatibility for target platforms.

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 a pull request may close this issue.

2 participants