P
P
Popou2022-03-12 06:24:22
C++ / C#
Popou, 2022-03-12 06:24:22

Source code generator how to get an Assembly object?

I'm just interested in working with reflection, I did not find information on how to do this (apparently I was looking badly) and the only thing that comes to mind is working with the syntax tree.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vasily Bannikov, 2022-03-12
@Popou

Inside the Source Generator, you cannot access reflection, since reflection works with already compiled code.
So the analysis of the AST and the semantic model is the only way out.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question