CCLib.Misc 1.0.0.2060
CCLib.Misc
A collection of miscellaneous, general purpose C# helper classes, packaged for NuGet.
Target frameworks: netstandard2.0, net8.0, net10.0.
Installation
dotnet add package CCLib.Misc
Contents
| Type | Description |
|---|---|
CCLib.Misc.Base32 |
Base32 encoding/decoding (RFC 3548 / RFC 4648), with optional padding. |
Tests
Unit tests live in tests/CCLib.Misc.Tests (xUnit) and
run against every runtime target framework the library ships for:
dotnet test
Versioning
The package version has four parts: MAJOR.MINOR.RELEASE.BUILDNUMBER.
MAJOR.MINOR.RELEASEcomes from<VersionPrefix>inDirectory.Build.propsand is maintained by hand.BUILDNUMBERis computed at build time:BUILDNUMBER = floor(days between BuildNumberEpoch and the HEAD commit date) * 10 + BUILD_NUMBER_INCREMENTBuildNumberEpochis2026-01-01. The* 10leaves room for up to 10 distinct builds of the same commit date, selected with theBUILD_NUMBER_INCREMENTenvironment variable (0–9, default0).
Example — a commit dated 2026-07-26 is 206 days after the epoch:
BUILD_NUMBER_INCREMENT |
Version |
|---|---|
unset / 0 |
1.0.0.2060 |
1 |
1.0.0.2061 |
9 |
1.0.0.2069 |
The commit date comes from git log -1 --pretty=format:%cs. Outside a git
repository the current UTC date is used instead and a CCLIB0001 warning is
emitted, so local builds keep working.
Handy commands
# Print the version that would be produced
dotnet build -t:ShowVersion -v:m -nologo
# Build the package
dotnet pack -c Release -o artifacts
# Second build of the same day
BUILD_NUMBER_INCREMENT=1 dotnet pack -c Release -o artifacts # bash
$env:BUILD_NUMBER_INCREMENT=1; dotnet pack -c Release -o artifacts # PowerShell
# Override once, without the environment variable
dotnet pack -c Release -p:BuildNumberIncrement=3 -o artifacts
# Ignore the date logic entirely and just use VersionPrefix
dotnet pack -c Release -p:DisableAutoBuildNumber=true
Symbols and debugging
dotnet pack produces two files:
| File | Contents |
|---|---|
CCLib.Misc.<version>.nupkg |
The package itself: assemblies, README, metadata. |
CCLib.Misc.<version>.snupkg |
The symbol package: just the .pdb files. |
The symbol package is enabled by IncludeSymbols / SymbolPackageFormat in
Directory.Build.props. NuGet.org accepts it next to
the main package and serves it from its symbol server, so consumers get proper
file names and line numbers in stack traces and — thanks to SourceLink, also
enabled there — can step straight into the original source fetched from the
matching GitHub commit.
It costs consumers nothing: the .snupkg is only downloaded when a debugger
asks for it. dotnet nuget push "artifacts/*.nupkg" uploads the sibling
.snupkg automatically, so no extra push step is needed.
Releasing
The pack workflow builds and packs on every push;
pushing a tag matching v* publishes to NuGet.org using the NUGET_API_KEY
repository secret. BUILD_NUMBER_INCREMENT can be supplied when running the
workflow manually.
License
MIT — see LICENSE.
No packages depend on CCLib.Misc.
.NET 10.0
- No dependencies.
.NET 8.0
- No dependencies.
.NET Standard 2.0
- No dependencies.
| Version | Downloads | Last updated |
|---|---|---|
| 1.0.0.2060 | 0 | 07/27/2026 |