Ninject.Extensions.DependencyInjection 1.0.2

dotnet add package Ninject.Extensions.DependencyInjection --version 1.0.2
NuGet\Install-Package Ninject.Extensions.DependencyInjection -Version 1.0.2
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="Ninject.Extensions.DependencyInjection" Version="1.0.2" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Ninject.Extensions.DependencyInjection --version 1.0.2
#r "nuget: Ninject.Extensions.DependencyInjection, 1.0.2"
#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.
// Install Ninject.Extensions.DependencyInjection as a Cake Addin
#addin nuget:?package=Ninject.Extensions.DependencyInjection&version=1.0.2

// Install Ninject.Extensions.DependencyInjection as a Cake Tool
#tool nuget:?package=Ninject.Extensions.DependencyInjection&version=1.0.2

Ninject.Extensions.DependencyInjection

GitHub CI

Overview

This repo is based on https://github.com/lord-executor/Ninject.Web.AspNetCore which has the original work.

This project provides full Ninject integration with .NET Core projects. This integrates .NET Core service collection with the Ninject kernel and uses Ninject's kernel as the service provider.

Examples

Simple Program.cs

using Microsoft.AspNetCore.Builder;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
using Ninject;
using Ninject.Extensions.DependencyInjection;

var builder = WebApplication.CreateBuilder(args);

builder.Host
    .UseServiceProviderFactory(new NinjectServiceProviderFactory())
    .ConfigureContainer<IKernel>(kernel =>
    {
        // Ninject Binding here
        // kernel.Bind<IServiceA>().To<ServiceA>();
    });

// ServiceCollection Binding here
// builder.Services
//     .AddTransient<IServiceB, ServiceB>();

builder.Services.AddMvc();

var app = builder.Build();

app.UseRouting()
    .UseEndpoints(endpoints => endpoints.MapControllers());

await app.RunAsync();

With Startup.cs file

Program.cs

using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Hosting;
using Ninject.Extensions.DependencyInjection;

var builder = Host.CreateDefaultBuilder(args);

builder
    .UseServiceProviderFactory(new NinjectServiceProviderFactory())
    .ConfigureWebHostDefaults(webBuilder => webBuilder.UseStartup<Startup>());

var app = builder.Build();

await app.RunAsync().ConfigureAwait(false);

Startup.cs

public class Startup
{
    public static void Configure(IApplicationBuilder app)
    {
        app.UseRouting()
           .UseEndpoints(endpoints => endpoints.MapControllers());
    }

    public static void ConfigureServices(IServiceCollection services)
    {
        // ServiceCollection Binding here
        // builder.Services
        //     .AddTransient<IServiceB, ServiceB>();
        
        services.AddMvc();
    }

    public static void ConfigureContainer(IKernel builder)
    {
        // Ninject Binding here
        // kernel.Bind<IServiceA>().To<ServiceA>();
    }
}
Product Compatible and additional computed target framework versions.
.NET net5.0 is compatible.  net5.0-windows was computed.  net6.0 is compatible.  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 is compatible.  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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on Ninject.Extensions.DependencyInjection:

Package Downloads
Ninject.Extensions.DependencyInjection.AspNetCore

Package Description

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.0.2 11,163 8/2/2023
1.0.1-beta 132 7/31/2023
1.0.0-beta 114 7/29/2023