Configuration.Writable.Yaml
0.9.1
dotnet add package Configuration.Writable.Yaml --version 0.9.1
NuGet\Install-Package Configuration.Writable.Yaml -Version 0.9.1
<PackageReference Include="Configuration.Writable.Yaml" Version="0.9.1" />
<PackageVersion Include="Configuration.Writable.Yaml" Version="0.9.1" />
<PackageReference Include="Configuration.Writable.Yaml" />
paket add Configuration.Writable.Yaml --version 0.9.1
#r "nuget: Configuration.Writable.Yaml, 0.9.1"
#:package Configuration.Writable.Yaml@0.9.1
#addin nuget:?package=Configuration.Writable.Yaml&version=0.9.1
#tool nuget:?package=Configuration.Writable.Yaml&version=0.9.1
Configuration.Writable.Yaml
A library that extends Configuration.Writable to support YAML format for configuration files.
This provider uses VYaml, a source-generator-based YAML serializer, and supports NativeAOT environments.
How to use
Without DI
using Configuration.Writable;
WritableOptions.Initialize<UserSecretSetting>(conf => {
conf.FormatProvider = new YamlFormatProvider();
});
With DI
builder = new HostApplicationBuilder(args);
builder.Services.AddWritableOptions<UserSecretSetting>(conf => {
conf.FormatProvider = new YamlFormatProvider();
});
NativeAOT Support
YamlFormatProvider uses VYaml's source-generated formatters, making it compatible with NativeAOT and trimming.
Requirements
- Annotate your settings class with
[YamlObject](fromVYaml.Annotations) and declare it aspartial - Call the generated
__RegisterVYamlFormatter()method at program startup
When YamlFormatProvider is used through WritableOptionsConfigBuilder<T>, the provider's typed deserializer is registered automatically while the options are being built.
No additional YamlFormatProvider.Register<T>() call is required.
using VYaml.Annotations;
[YamlObject]
public partial class SampleSetting
{
public string Name { get; set; } = "";
public DateTime LastUpdatedAt { get; set; }
}
// Register formatters at startup (required for NativeAOT)
SampleSetting.__RegisterVYamlFormatter();
Example
See Example.ConsoleApp.Yaml for a complete NativeAOT publishable example.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 is compatible. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. 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. |
| .NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
| .NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
| MonoAndroid | monoandroid was computed. |
| MonoMac | monomac was computed. |
| MonoTouch | monotouch was computed. |
| Tizen | tizen40 was computed. tizen60 was computed. |
| Xamarin.iOS | xamarinios was computed. |
| Xamarin.Mac | xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.0
- Configuration.Writable.Core (>= 0.9.1)
- System.Buffers (>= 4.6.1)
- VYaml (>= 1.4.0)
-
net10.0
- Configuration.Writable.Core (>= 0.9.1)
- VYaml (>= 1.4.0)
-
net8.0
- Configuration.Writable.Core (>= 0.9.1)
- VYaml (>= 1.4.0)
-
net9.0
- Configuration.Writable.Core (>= 0.9.1)
- VYaml (>= 1.4.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 0.9.1 | 806 | 9/12/2026 |
| 0.9.0 | 276 | 9/10/2026 |
| 0.8.0 | 152 | 9/9/2026 |
| 0.7.1 | 134 | 9/9/2026 |
| 0.7.0 | 158 | 9/7/2026 |
| 0.6.0 | 200 | 7/29/2026 |
| 0.5.0 | 281 | 7/11/2026 |
| 0.4.3 | 161 | 2/4/2026 |
| 0.4.2 | 152 | 2/3/2026 |
| 0.4.1 | 142 | 2/2/2026 |
| 0.4.1-gb9a214a6bc | 132 | 2/2/2026 |
| 0.4.0 | 145 | 1/15/2026 |
| 0.3.0 | 146 | 1/6/2026 |
| 0.2.1 | 153 | 1/5/2026 |
| 0.2.0 | 143 | 1/5/2026 |
| 0.1.12 | 145 | 1/2/2026 |
| 0.1.3 | 221 | 12/23/2025 |
| 0.1.0 | 209 | 12/21/2025 |
| 0.1.0-alpha.159 | 215 | 12/19/2025 |
| 0.1.0-alpha.2 | 159 | 12/21/2025 |