Injectable 2.0.0

dotnet add package Injectable --version 2.0.0
                    
NuGet\Install-Package Injectable -Version 2.0.0
                    
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="Injectable" Version="2.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Injectable" Version="2.0.0" />
                    
Directory.Packages.props
<PackageReference Include="Injectable" />
                    
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 Injectable --version 2.0.0
                    
#r "nuget: Injectable, 2.0.0"
                    
#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 Injectable@2.0.0
                    
#: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=Injectable&version=2.0.0
                    
Install as a Cake Addin
#tool nuget:?package=Injectable&version=2.0.0
                    
Install as a Cake Tool

Injectable

Injectable is a Roslyn source generator that scans your assemblies for injectable types and emits registration metadata for dependency injection containers.

What this package does

  • Targets: netstandard2.0
  • Kind: Analyzer / source generator
  • Discovers: Types annotated with attributes from Injectable.Abstractions
  • Generates: A list of injectable service registrations that you can plug into your DI container

Basic usage

  1. Add a package reference to Injectable and Injectable.Abstractions in your project.
  2. Annotate services you want to be discovered, for example:
using Injectable;

[Injectable]
public class MyService : IMyService { }
  1. Build your project. The generator will emit injectable metadata (e.g. Injectables.g.cs) which you can use to register services in your container.

For more advanced configuration and examples, see the project site or GitHub repository linked from the NuGet page.

There are no supported framework assets in this package.

Learn more about Target Frameworks and .NET Standard.

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.0.0 200 12/22/2025
2.0.0-PR5-20251222-124117 178 12/22/2025
2.0.0-PR5-20251222-123820 158 12/22/2025
2.0.0-PR5-20251222-121742 160 12/22/2025
2.0.0-PR5-20251222-114809 157 12/22/2025
2.0.0-PR5-20251222-114401 159 12/22/2025
2.0.0-PR5-20251222-112704 160 12/22/2025
2.0.0-PR5-20251222-112432 176 12/22/2025
2.0.0-PR5-20251222-111306 156 12/22/2025
2.0.0-PR5-20251222-105622 158 12/22/2025
2.0.0-PR5-20251222-102814 161 12/22/2025
2.0.0-PR5-20251222-102332 159 12/22/2025
2.0.0-PR5-20251221-105855 145 12/21/2025
2.0.0-PR5-20251221-104140 145 12/21/2025
2.0.0-PR5-20251115-201334 151 11/15/2025
2.0.0-PR5-20251115-190652 147 11/15/2025
1.0.2-PR5-20251115-190106 155 11/15/2025
1.0.2-PR5-20251115-185650 151 11/15/2025
0.0.0-PR5-20251028-201200 185 10/28/2025
Loading failed