Replies: 2 comments
-
We have figured out we can use |
Beta Was this translation helpful? Give feedback.
-
Target framework isn't a thing at the view of compiler. It can be compiled against a random set of reference libraries. The common practice to detect runtime feature is detecting the existence of certain member. The constants defined in |
Beta Was this translation helpful? Give feedback.
-
I'm trying to understand from a source generator how to get the current target framework. I need to know the target framework to map a setting in an auxiliary file.
I see in the source-generators.cookbook.md there is a open issue showing how to do this but I can't find an example on how to do it.
My best guess is we deliver a props like this to expose it but if that is direction I don't see how you would reference the props file in the
CSharpSourceGeneratorTest
for unit tests.Beta Was this translation helpful? Give feedback.
All reactions