Skip to content

Referencing the analyzer package with PrivateAssets="All" #1

@dbolin

Description

@dbolin

Currently you have to reference the analyzer with PrivateAssets="All" to prevent the analyzer from flowing to referencing projects. However, this means referencing projects don't reference the Attributes package, which can cause issues with runtime reflection.

PrivateAssets="analyzers" would be the preferred solution but needs NuGet/Home#6279 to be resolved.

One workaround is to reference the Attributes package directly in projects that need it.

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingimmutable analyzerRelated to immutable analyzer

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions