dotnet / roslyn-analyzers-contrib

Replaced by dotnet/roslyn-analyzers.

Home Page:https://github.com/dotnet/roslyn-analyzers

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Update analyzer project template to separate analyzers from code fixes

sharwell opened this issue · comments

Currently the project template places analyzers and code fixes in the same assembly. This results in a dependency on Microsoft.CodeAnalysis.Workspaces which is easy to accidentally use in an analyzer, resulting in type load exceptions when building from the command line. For example, DotNetAnalyzers/StyleCopAnalyzers#1352 was the underlying cause of DotNetAnalyzers/StyleCopAnalyzers#1659, which was extremely difficult to track down but would have been easily avoided if the assemblies were separated from the start.