Skip to main content

This package contains a Souce Generator which generates Value Objects that wrap simple primitives such as int, string, double etc. A ValueObject is a strongly typed (strongly, not stringly) domain object that is immutable. Instead of `int customerId = 42;` we have `var customerId = CustomerId.From(42);` To use, just create something like this: [ValueObject(typeof(int))] public partial struct CustomerId { } var customerId = CustomerId.From(42); Validation is in just one place. You can't introduce bad objects into your domain, therefore you can assume that in your domain every ValueObject is valid.

Total Downloads
6.3M
6,284,965
Published
May 11, 2026
Latest stable version

Install

.NET CLI
dotnet add package Vogen --version 8.0.6-beta.4
Package Manager Console
Install-Package Vogen -Version 8.0.6-beta.4
PackageReference
<PackageReference Include="Vogen" Version="8.0.6-beta.4" />

Frameworks

.NETStandard2.0

Dependencies

No declared dependencies.

Adoption guide

Assess this package against its supported frameworks, license, maintenance signals and dependency graph before making it a project standard.

This version is marked prerelease. Validate its API and upgrade path before production use.

Compatibility metadata lists 1 target framework; confirm the exact target used by your application.

How to read this guidance

Sources: published NuGet v3 registry metadata and explicit NuBrowse editorial guides. Refresh: package metadata is refreshed from NuGet when the page loads. Limit: this is not a security, legal or compatibility guarantee; validate the selected version in your project.

Useful next steps

Move from package metadata to a concrete selection or review workflow.