---
title: SAIF.Framework.Version overview
summary: High-level purpose, scope, and responsibilities for this library.
status: draft
owner: <owner>
last_reviewed: 2026-07-23
library: SAIF.Framework.Version
reference_type: package
---

# SAIF.Framework.Version overview

> **Documentation context:** Packaged Component (NuGet)

SAIF.Framework.Version is a small, self-contained utility library that provides a custom four-part (`Major.Minor.Build.Revision`) version-number value object, `Version`, with parsing, formatting, numeric comparison, and template-based incrementing. It parallels but does not use `System.Version`, and is architecturally isolated from the rest of the SAIF Framework.

## Purpose
- Represent, parse, format, compare, and increment a four-segment version number (`Major.Minor.Build.Revision`) as a reusable value object.
- Support version-stamping style workflows where a version string needs to be incremented according to a template format (including a `*` auto-increment token and `{year}`/`{month}`/`{day}` date placeholders).

## Responsibilities
- Parse a delimited version string into `Major`, `Minor`, `Build`, and `Revision` segments, defaulting missing trailing segments to `"0"`.
- Format a `Version` instance back to its canonical `"{Major}.{Minor}.{Build}.{Revision}"` string via `ToString()`.
- Compare two `Version` instances numerically (not as strings) via `CompareTo` and the overloaded `=`, `<>`, `<`, `>` operators.
- Produce an incremented version from a template `format` string via `Increment(format)`.
- Coerce non-numeric or unparsable version segments to `0` when normalizing values for comparison, via the internal `ToInt` extension method.

## Key components
- `Version`: The sole domain class. Implements `IComparable`; owns all parsing, formatting, comparison, and increment logic.
- `Extensions`: A supporting module providing the `ToInt(value As String) As Integer` extension method on `String`, used internally by `Version` to normalize segment values.

## Related documentation
- [Index](index.md)
- [Architecture](architecture.md)
- [Dependencies](dependencies.md)
- [Operations and processes](operations-processes.md)
- [Business rules](business-rules.md)
- [Configuration](configuration.md)
- [API reference](api/index.md)

## Sources
- `SAIF.Framework.Version\Version.vb`
- `SAIF.Framework.Version\SAIF.Framework.Version.vbproj`
