M
M
mindgrow2019-03-01 13:43:08
.NET
mindgrow, 2019-03-01 13:43:08

Roslyn \ Why is ContainingAssembly = null?

Good afternoon!
I am writing a code analyzer. The analyzer must receive a list of classes related to a specific namespice in a specific assembly. To do this, I first select the root namespaces in the project, and then recursively select the child namespaces and select all the classes that are in the project from the general list.
The problem is that on a test project, I made a filter by ContainingAssembly in the namespace, which should be equal to the namespace of the specified project in order to filter out the connected namespaces of other assemblies. But when I switched to a combat project, I came across the fact that all namespaces have ContainingAssembly == null
How can this be and how can I get around it if it cannot be fixed?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question