Skip to content
This repository has been archived by the owner on Oct 12, 2022. It is now read-only.

Analyzer runs on projects that it's not installed to. #91

Open
ssg opened this issue Nov 21, 2021 · 2 comments
Open

Analyzer runs on projects that it's not installed to. #91

ssg opened this issue Nov 21, 2021 · 2 comments

Comments

@ssg
Copy link

ssg commented Nov 21, 2021

  • Have two projects: A, B.
  • B depends on A.
  • Install analyzer only to project A.
  • Analyzer reports errors in project B.
@notanaverageman
Copy link

There is an easy workaround. Add PrivateAssets="all" to PackageReference on project A.

<PackageReference Include="ClrHeapAllocationAnalyzer" Version="3.0.0" PrivateAssets="all" />

@ssg
Copy link
Author

ssg commented Dec 31, 2021

Thanks, shouldn't that be the default behavior?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants