CPMR0074 - Dependency On Hook Package (nuspec)

CPMR0074 - Dependency On Hook Package (nuspec)

WARNING

This rule has been marked as a Requirement.

Requirements represent the minimum quality of a package that is acceptable. When a package version has failed requirements, the package version requires fixing and/or response by the maintainer. Provided a Requirement has flagged correctly, it must be fixed before the package version can be approved. The exact same version should be uploaded during moderation review.

Issue

Within the nuspec, a dependency on a package with the .hook suffix was found. Packages, other than .hook packages, should not have such a dependency.

Remove any dependency that specifies a package with a .hook suffix.

Reasoning

Since a .hook package will introduce scripts that will be installed on the user’s computer and run before or after any install, upgrade or uninstall that the user attempts, such packages should never be automatically installed. A user should explicitly opt into using such packages, and other packages should not go against this practice.