This repository deals with how the implementation of validating rules valid for the Chocolatey Community Repository are implemented. This project is meant to be published as a Chocolatey CLI extension that users can install to validate their packages does not violate any of the rules required to be passing when pushing packages to Chocolatey Community Repository. Additionally, it is intended that the Package Validator will eventually reference an internal only NuGet package of this project to prevent the need to duplicate rules in both places.
To build this project, the following requirements must be met.
Before being able to build the project through Visual Studio and to debug the project, it is required to run the script Get-ChocoDebugLibraries.ps1
first.
Running this script will take care of the necessary prerequisite steps to be able to build and debug the project.
The steps to follow in this case is:
There are two options to be able to get the debug version of Chocolatey CLI.
chocolatey/choco
repository to your preferred location.
b. Run .\Get-ChocoDebugLibraries.ps1 -ChocoSourceLocation <PATH_TO_SOURCE_ROOT>
(ChocoSourceLocation
may be defined as the environment variable CHOCO_SOURCE_LOCATION
)CHOCO_SOURCE_LOCATION
set in this case).
a. Run .\Get-ChocoDebugLibraries.ps1 -CheckoutRefTag
(Alternatively you can check out a specific tag or branch using .\Get-ChocoDebugLibraries.ps1 -CheckoutTag 2.0.0
).chocolatey.dll
instead of choco.exe
. It is uncertain of how to fix this problem at this time.NuspecReader
. This is due to us not directly referencing any of the NuGet.Client
libraries ourselves.