Replies: 1 comment
-
Found out. I can import the Microsoft.CodeAnalysis.* {Version}, and then package the analyzer under |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I've got a source generator that can target multiple framework versions.
If the user uses a collection expression (e.g.
List<string> _list = []
) then I need access to the newer compiler features, so I will need a newer codeanalysis package.However, I also still want to be able to reference an older codeanalysis package for older sdks.
How would I do this?
I know I'll have to do some pre-processor if statements
E.g.
but I don't know what I would use to generate that pre-processor variable.
Beta Was this translation helpful? Give feedback.
All reactions