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

Print compiler version in diagnostics when certain code is compiled #17859

Closed
jcouv opened this issue Mar 14, 2017 · 1 comment
Closed

Print compiler version in diagnostics when certain code is compiled #17859

jcouv opened this issue Mar 14, 2017 · 1 comment
Assignees
Labels
Area-Compilers Feature Request Resolution-Fixed The bug has been fixed and/or the requested behavior has been implemented
Milestone

Comments

@jcouv
Copy link
Member

jcouv commented Mar 14, 2017

It would be useful to troubleshooting purpose to have the equivalent of phpversion() for C# and VB.
It could be a special pragma (#VERSION), a well-known method without implementation (System.Runtime.CompilerServices.RuntimeHelpers.Version()?) or maybe a special doc tag.

The output should not only include the version of the compiler, but also the language version that is used to compile the current code (this would be useful in asp.net scenario).

FYI @gafter @jaredpar

@jcouv
Copy link
Member Author

jcouv commented Mar 24, 2017

Fixed by #18045

With the C# compiler, use #error version and you will get a diagnostic including the compiler and language version this code is getting compiled with.

@jcouv jcouv closed this as completed Mar 24, 2017
@jcouv jcouv added the Resolution-Fixed The bug has been fixed and/or the requested behavior has been implemented label Mar 24, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Compilers Feature Request Resolution-Fixed The bug has been fixed and/or the requested behavior has been implemented
Projects
None yet
Development

No branches or pull requests

2 participants