CCG0004

Cake-reference has not set PrivateAssets="all"

Table of Contents

Cause

This error is raised, when one of the following packages is referenced without having PrivateAssets="all" set.

  • Cake.Addin.Analyzer
  • Cake.Common
  • Cake.Core
  • CakeContrib.Guidelines

Description

References to Cake.Core or Cake.Common are usually only used for local compilation and should not be exposed to consuming packages.

References to Cake.Addin.Analyzer and CakeContrib.Guidelines are only used to analyze the current project and should never be exposed to consuming packages.

How to fix violations

Add the attribute PrivateAssets="all" to all required references.

GitHub Discussion