Create Chocolatey Package for NLogViewer Client Application
Overview
Create a Chocolatey package for the NLogViewer Client Application to enable easy installation and distribution via the Chocolatey package manager. This includes setting up automated build and deployment pipelines.
Objectives
-
Create Chocolatey Package Specification
- Define package metadata (nuspec file)
- Configure installation/uninstallation scripts
- Handle dependencies (e.g., .NET 8 runtime if needed)
- Package the MSI installer or application binaries
-
Build Pipeline Integration
- Integrate Chocolatey package creation into existing build process
- Automate package versioning (using GitVersion)
- Generate
.nupkg file during CI/CD
-
Deployment Pipeline
- Automate publishing to Chocolatey Community Repository
- Set up release workflow for package updates
- Handle package approval process
Technical Requirements
Package Structure
chocolatey/
├── nlogviewer-clientapplication.nuspec
├── tools/
│ ├── chocolateyinstall.ps1
│ ├── chocolateyuninstall.ps1
│ └── chocolateyBeforeModify.ps1
└── README.md
Package Details
- Package ID:
nlogviewer-clientapplication (or nlogviewer)
- Description: Standalone log viewer for NLog logs via UDP network protocol or log files
- Author: Dominic Böxler
- Project URL: https://github.com/boexler/NLogViewer
- License: See LICENSE.md
- Tags: nlog, logging, log-viewer, wpf, windows
Installation Requirements
- Installation Method: Use existing MSI installer from WiX project
- Installation Path: Program Files (per-machine installation)
- Shortcuts: Start Menu and Desktop shortcuts (already configured in MSI)
- Dependencies:
- .NET 8 Runtime (if not self-contained)
- Or ensure self-contained deployment is used
Version Management
- Use GitVersion for automatic versioning
- Sync package version with application version
- Follow Semantic Versioning (SemVer) for Chocolatey compatibility
Implementation Tasks
Phase 1: Package Creation
Phase 2: Build Integration
Phase 3: Deployment Pipeline
Phase 4: Documentation
CI/CD Pipeline Structure
Build Pipeline Steps
-
Restore Dependencies
- name: Restore NuGet packages
- name: Install WiX Toolset (if needed)
-
Build Application
- name: Build NLogViewer.ClientApplication
- name: Publish self-contained application
-
Build Installer
- name: Build WiX MSI installer
-
Create Chocolatey Package
- name: Pack Chocolatey package
- name: Validate package (choco lint)
- name: Test package installation (choco install --source .)
-
Publish Artifacts
- name: Upload .nupkg artifact
Release Pipeline Steps
- Trigger: On tag/release creation (e.g.,
v*.*.*)
- Build: Run build pipeline
- Validate: Package validation and testing
- Publish: Push to Chocolatey Community Repository
choco push nlogviewer-clientapplication.*.nupkg --source https://push.chocolatey.org/ --api-key $env:CHOCOLATEY_API_KEY
Testing Checklist
Chocolatey Repository Requirements
Additional Considerations
-
Self-Contained vs Framework-Dependent
- Current project uses self-contained deployment (
SelfContained=true)
- Ensure MSI includes all dependencies
- Or add .NET 8 runtime as Chocolatey dependency
-
Package Size
- Monitor package size (Chocolatey has limits)
- Consider using download URLs if package is too large
- Use checksums for verification
-
Update Mechanism
- Implement proper upgrade handling
- Preserve user settings during upgrades
- Handle configuration file migrations if needed
-
Security
- Sign the package (optional but recommended)
- Use secure download methods
- Verify checksums
Resources
Acceptance Criteria
Related Issues
- Consider linking to any existing installer or deployment issues
- May relate to versioning or release automation tasks
Create Chocolatey Package for NLogViewer Client Application
Overview
Create a Chocolatey package for the NLogViewer Client Application to enable easy installation and distribution via the Chocolatey package manager. This includes setting up automated build and deployment pipelines.
Objectives
Create Chocolatey Package Specification
Build Pipeline Integration
.nupkgfile during CI/CDDeployment Pipeline
Technical Requirements
Package Structure
Package Details
nlogviewer-clientapplication(ornlogviewer)Installation Requirements
Version Management
Implementation Tasks
Phase 1: Package Creation
chocolatey/directory structurenuspecfile with package metadatachocolateyinstall.ps1)chocolateyuninstall.ps1)chocolateyBeforeModify.ps1)choco packandchoco install --source .Phase 2: Build Integration
Phase 3: Deployment Pipeline
Phase 4: Documentation
CI/CD Pipeline Structure
Build Pipeline Steps
Restore Dependencies
Build Application
Build Installer
Create Chocolatey Package
Publish Artifacts
Release Pipeline Steps
v*.*.*)Testing Checklist
choco lintvalidationchoco install --source .testChocolatey Repository Requirements
Additional Considerations
Self-Contained vs Framework-Dependent
SelfContained=true)Package Size
Update Mechanism
Security
Resources
Acceptance Criteria
choco install nlogviewer-clientapplicationRelated Issues