Skip to content

NuGetMandatoryPackage

Andrey Lipatkin edited this page Mar 25, 2017 · 1 revision

What this rule is about?

This verification fails if some project does not reference mandatory NuGet package - e.g. Roslyn Analyzer.

Why should I enable this rule?

Control and consistency.

How to enable/configure this rule

<Rules>
...
  <NuGetMandatoryPackage enabled="false"> 
    <!--This package must be referenced in all projects--> 
    <Package id="mandatory-package-id" /> 
    <!--SomeProject.csproj does not have to reference mandatory packages--> 
    <Exception> 
      <Project>SomeProject.csproj</Project> 
    </Exception> 
  </NuGetMandatoryPackage> 
...
</Rules>

Clone this wiki locally