0

I would like to write DiagnosticAnalyzer, which analyzes if a class (ie. BotAggregate) declared in a MyProject.Domain assembly has it's own DbSet<BotAggregate> declared in MyProjectDbContext class which is placed in MyProject.EFCore assembly.

When I do place the analyzer in MyProject.EFCore project, it does not even see the BotAggregate class declaration (because it scans the assembly where analyzer is referenced). And if I place the analyzer in MyProject.Domain it could not access the MyProjectDbContext to check if there is a required property.

Is it even possible to "cross check" the declaration and usage by Roslyn analyzer?

Tomasz
  • 2,051
  • 3
  • 31
  • 64

0 Answers0