Skip to content

Can I use Microsoft.CodeAnalysis.BannedApiAnalyzers as a library to analyze source code in a folder? #74974

Answered by 333fred
MartyIX asked this question in Q&A
Discussion options

You must be logged in to vote

You cannot do this, it is not a supported use case. What you could do is use Roslyn itself to create a compilation for those files, add the banned api analyzer to that compilation, and then get all diagnostics.

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@MartyIX
Comment options

@MartyIX
Comment options

@333fred
Comment options

Answer selected by MartyIX
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants