You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm reposting my question from Roslyn discussions here as @333fredmentioned that one can depend on BannedApiAnalyzerspackage as a reference and not as an analyzer.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I created a minimum repro project here https://github.com/MartyIX/BannedApiRepro. This line https://github.com/MartyIX/BannedApiRepro/blob/ee700c9624154a645af55dcccaf684bac792e7a4/Program.cs#L7 reports a build error because
CSharpSymbolIsBannedAnalyzer
1 is not available.I'm reposting my question from Roslyn discussions here as @333fred mentioned that one can depend on
BannedApiAnalyzers
package as a reference and not as an analyzer.Can I fix somehow this line https://github.com/MartyIX/BannedApiRepro/blob/ee700c9624154a645af55dcccaf684bac792e7a4/BannedApiRepro.csproj#L10 so that
CSharpSymbolIsBannedAnalyzer
is available?Thank you
edit: It seems like dotnet/roslyn#55229 can be somehow useful here but I have not figured it out yet.
Footnotes
https://github.com/dotnet/roslyn-analyzers/blob/main/src/Microsoft.CodeAnalysis.BannedApiAnalyzers/CSharp/CSharpSymbolIsBannedAnalyzer.cs ↩
Beta Was this translation helpful? Give feedback.
All reactions