Quantcast
Channel: Active questions tagged nuget-package - Stack Overflow
Viewing all articles
Browse latest Browse all 3067

How to hide a local DLL reference in Analyzer Dependencies and only have just analyzers

$
0
0

I have created 2 custom analyzer using template "Analyzer with Code Fix (.NET Standard)" in VS 2019. Each analyzer has different project, and package project as well. Also I have Common project with some common shared code that are using every analyzer.

To be more clear, Custom Analyzer solution looks like:enter image description here

csproj file for analyzer (Analyzer1 and Analyzer2) is:enter image description here

Producing Nuget is by Package csproj files, i.e. for Analyzer1 is:enter image description here

When I produce nupkg file both dlls are in folder "analyzers\dotnet\cs":

  • Analyzer1.dll or Analyzer2.dll
  • Common.dll

I include Nuget packages in final project as:enter image description here

When using those 2 analyzers, I got this situation:enter image description here

Goal:I want to have independent analyzers that all uses some shared code from Common project. Everything works except showing Common.dll that are not actually analyzer but code that analyzer depends on.

QUESTION:Is it possible to hide Common.dll from Dependencies/Analyzers and only have separate analyzers (Analyzer1, Analyzer2...)?


Viewing all articles
Browse latest Browse all 3067

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>