MeddlingIdiot.Velopack
1.2.0
dotnet add package MeddlingIdiot.Velopack --version 1.2.0
NuGet\Install-Package MeddlingIdiot.Velopack -Version 1.2.0
<PackageReference Include="MeddlingIdiot.Velopack" Version="1.2.0" />
<PackageVersion Include="MeddlingIdiot.Velopack" Version="1.2.0" />
<PackageReference Include="MeddlingIdiot.Velopack" />
paket add MeddlingIdiot.Velopack --version 1.2.0
#r "nuget: MeddlingIdiot.Velopack, 1.2.0"
#:package MeddlingIdiot.Velopack@1.2.0
#addin nuget:?package=MeddlingIdiot.Velopack&version=1.2.0
#tool nuget:?package=MeddlingIdiot.Velopack&version=1.2.0
MeddlingIdiot.Velopack
A reusable Velopack bootstrapper library that provides automated update management with flexible channel configuration for .NET applications.
Overview
This library simplifies integrating Velopack updates into your .NET applications by providing:
- Automatic update checking and installation
- Flexible channel configuration (Stable, Prerelease, Beta, etc.)
- Multiple configuration methods: environment variables, command-line arguments, or marker files
- Support for both global and application-specific channel settings
Getting Started
Installation
Add a reference to the MeddlingIdiot.Velopack project in your application:
<ItemGroup>
<ProjectReference Include="..\MeddlingIdiot.Velopack\Automation.Velopack.csproj" />
</ItemGroup>
Basic Usage
In your application's startup code:
using Automation.Velopack;
// Call this early in your application startup
Velopack.Build().Run();
VelopackBootstrapper.Startup("YourAppName");
Channel Configuration
The library resolves update channels in the following priority order:
- Environment Variable -
VELOPACK_CHANNEL(highest priority) - Command Line Argument -
--channel=ChannelName - Global Channel File -
%LOCALAPPDATA%\Automation\.channel - Application Channel File -
%LOCALAPPDATA%\YourAppName\.channel - Default - "Stable" (lowest priority)
Creating Channel Files
Use the CreateChannelFile method to create channel marker files programmatically:
// Create a global channel file (affects all apps using this library)
VelopackBootstrapper.CreateChannelFile(ChannelScope.Global, "YourAppName", "Prerelease");
// Create an application-specific channel file
VelopackBootstrapper.CreateChannelFile(ChannelScope.Application, "YourAppName", "Beta");
Command Line Usage
Users can specify a channel via command line:
YourApp.exe --channel=Prerelease
Environment Variable Usage
Set the environment variable for CI/CD or testing:
set VELOPACK_CHANNEL=Development
YourApp.exe
Channel Scope
- Global (
ChannelScope.Global): Stored in%LOCALAPPDATA%\Automation\.channel- affects all applications using this library - Application (
ChannelScope.Application): Stored in%LOCALAPPDATA%\YourAppName\.channel- specific to one application
Build and Test
Build the solution:
dotnet build
Run the unit tests:
dotnet test
The test project includes comprehensive tests for:
- Channel resolution logic
- Channel file creation (global and application-scoped)
- Priority ordering of configuration sources
Requirements
- .NET 8.0 or higher
- Velopack NuGet package
Project Structure
- MeddlingIdiot.Velopack - Main library project
- Automation.Velopack.UnitTests - xUnit test project
License
[Specify your license here]
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- Velopack (>= 1.2.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.