SourceCrafter.DependencyInjection.MsConfiguration.Metadata 2.26.203.271

There is a newer version of this package available.
See the version list below for details.
dotnet add package SourceCrafter.DependencyInjection.MsConfiguration.Metadata --version 2.26.203.271
                    
NuGet\Install-Package SourceCrafter.DependencyInjection.MsConfiguration.Metadata -Version 2.26.203.271
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="SourceCrafter.DependencyInjection.MsConfiguration.Metadata" Version="2.26.203.271" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="SourceCrafter.DependencyInjection.MsConfiguration.Metadata" Version="2.26.203.271" />
                    
Directory.Packages.props
<PackageReference Include="SourceCrafter.DependencyInjection.MsConfiguration.Metadata" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add SourceCrafter.DependencyInjection.MsConfiguration.Metadata --version 2.26.203.271
                    
#r "nuget: SourceCrafter.DependencyInjection.MsConfiguration.Metadata, 2.26.203.271"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package SourceCrafter.DependencyInjection.MsConfiguration.Metadata@2.26.203.271
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=SourceCrafter.DependencyInjection.MsConfiguration.Metadata&version=2.26.203.271
                    
Install as a Cake Addin
#tool nuget:?package=SourceCrafter.DependencyInjection.MsConfiguration.Metadata&version=2.26.203.271
                    
Install as a Cake Tool

SourceCrafter.DependencyInjection.MsConfiguration.Metadata

Purpose

Provides metadata attributes for Microsoft.Extensions.Configuration integration with SourceCrafter.DependencyInjection. This package extends the core attributes to enable strongly-typed configuration loading from appsettings.json and other Microsoft configuration sources.

What It Provides

Configuration Loading Attributes for DI containers:

  • [JsonSetting<T>(sectionName)] – Load strongly-typed settings from JSON configuration sections
  • [ConfigurationSection(key)] – Raw access to configuration values
  • Support for nested and complex configuration objects

These attributes work seamlessly with Microsoft's IConfiguration from Microsoft.Extensions.Configuration.

Who Should Use This?

Library Authors – Define configuration contracts without coupling consumers to the code generator
Shared Kernel Projects – Define shared service and configuration metadata
Minimal Dependencies – When you only want metadata, not compile-time code generation

Not needed if – You're building a final application; just use SourceCrafter.DependencyInjection.MsConfiguration directly

Installation

dotnet add package SourceCrafter.DependencyInjection.MsConfiguration.Metadata

(Consumers of your library will add SourceCrafter.DependencyInjection.MsConfiguration to trigger code generation.)

How It Works

Intended for library authors who want to support configuration without requiring the code generator as a direct dependency.

Workflow

  1. Library Author: Adds SourceCrafter.DependencyInjection.MsConfiguration.Metadata to library
  2. Library: Decorates container with configuration attributes:
    [ServiceContainer]
    [JsonSetting<AppSettings>("AppSettings")]
    public partial class ServiceContainer { }
    
  3. Library Consumer: Adds SourceCrafter.DependencyInjection.MsConfiguration (code generator) to their project
  4. At Compile Time: Generator processes both metadata packages, generates configuration-aware resolvers
  5. At Runtime: Configuration loads from IConfiguration via the generated methods

Example

public class AppSettings {
	public string ConnectionString { get; set; }
	public int Timeout { get; set; }
}

// In library project (only metadata dependency)
[ServiceContainer]
[JsonSetting<AppSettings>("AppSettings")]
[Singleton<IAuthService, AuthService>]
public partial class ServiceContainer { }

// In consumer project (adds code generator)
var container = new ServiceContainer();
var settings = await container.Settings;  // Generated resolver

References

Product 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 was computed.  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 was computed.  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 was computed.  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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • .NETStandard 2.0

    • No dependencies.

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
2.26.249.144 137 9/6/2026
2.26.233.161 96 8/21/2026
2.26.227.290 104 8/15/2026
2.26.226.430 96 8/14/2026
2.26.226.81 98 8/14/2026
2.26.212.228 116 7/31/2026
2.26.212.105 112 7/31/2026
2.26.211.464 100 7/30/2026
2.26.206.340 107 7/25/2026
2.26.206.240 107 7/25/2026
2.26.206.225 102 7/25/2026
2.26.206.222 104 7/25/2026
2.26.206.44 110 7/25/2026
2.26.206.28 102 7/25/2026
2.26.206.21 102 7/25/2026
2.26.206.9 102 7/25/2026
2.26.205.341 111 7/24/2026
2.26.205.55 114 7/24/2026
2.26.204.248 109 7/23/2026
2.26.203.271 107 7/22/2026
Loading failed