Microsoft.Extensions.DependencyModel 7.0.0

.NET 6.0 .NET Standard 2.0 .NET Framework 4.6.2
dotnet add package Microsoft.Extensions.DependencyModel --version 7.0.0
NuGet\Install-Package Microsoft.Extensions.DependencyModel -Version 7.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="Microsoft.Extensions.DependencyModel" Version="7.0.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Microsoft.Extensions.DependencyModel --version 7.0.0
#r "nuget: Microsoft.Extensions.DependencyModel, 7.0.0"
#r directive can be used in F# Interactive, C# scripting and .NET Interactive. Copy this into the interactive tool or source code of the script to reference the package.
// Install Microsoft.Extensions.DependencyModel as a Cake Addin
#addin nuget:?package=Microsoft.Extensions.DependencyModel&version=7.0.0

// Install Microsoft.Extensions.DependencyModel as a Cake Tool
#tool nuget:?package=Microsoft.Extensions.DependencyModel&version=7.0.0

About

Provides abstractions for reading .deps files. When a .NET application is compiled, the SDK generates a JSON manifest file (<ApplicationName>.deps.json) that contains information about application dependencies. You can use Microsoft.Extensions.DependencyModel to read information from this manifest at run time. This is useful when you want to dynamically compile code (for example, using Roslyn Emit API) referencing the same dependencies as your main application.

By default, the dependency manifest contains information about the application's target framework and runtime dependencies. Set the PreserveCompilationContext project property to true to additionally include information about reference assemblies used during compilation.

For more information, see the documentation:

Example

The following example shows how to display the list of assemblies used when compiling the current application. Include <PreserveCompilationContext>true</PreserveCompilationContext> in your project file to run this example.

using System;
using Microsoft.Extensions.DependencyModel;

class Program
{
    static void Main()
    {
        Console.WriteLine("Compilation libraries:");
        Console.WriteLine();

        foreach (CompilationLibrary lib in DependencyContext.Default.CompileLibraries)
        {
            foreach (string path in lib.ResolveReferencePaths())
            {
                Console.WriteLine(path);
            }
        }
    }
}
Product Versions
.NET net5.0 net5.0-windows net6.0 net6.0-android net6.0-ios net6.0-maccatalyst net6.0-macos net6.0-tvos net6.0-windows net7.0
.NET Core netcoreapp2.0 netcoreapp2.1 netcoreapp2.2 netcoreapp3.0 netcoreapp3.1
.NET Standard netstandard2.0 netstandard2.1
.NET Framework net461 net462 net463 net47 net471 net472 net48
MonoAndroid monoandroid
MonoMac monomac
MonoTouch monotouch
Tizen tizen40 tizen60
Xamarin.iOS xamarinios
Xamarin.Mac xamarinmac
Xamarin.TVOS xamarintvos
Xamarin.WatchOS xamarinwatchos
Compatible target framework(s)
Additional computed target framework(s)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (840)

Showing the top 5 NuGet packages that depend on Microsoft.Extensions.DependencyModel:

Package Downloads
Microsoft.AspNetCore.Mvc.Core The ID prefix of this package has been reserved for one of the owners of this package by NuGet.org.

ASP.NET Core MVC core components. Contains common action result types, attribute routing, application model conventions, API explorer, application parts, filters, formatters, model binding, and more. Commonly used types: Microsoft.AspNetCore.Mvc.AreaAttribute Microsoft.AspNetCore.Mvc.BindAttribute Microsoft.AspNetCore.Mvc.ControllerBase Microsoft.AspNetCore.Mvc.FromBodyAttribute Microsoft.AspNetCore.Mvc.FromFormAttribute Microsoft.AspNetCore.Mvc.RequireHttpsAttribute Microsoft.AspNetCore.Mvc.RouteAttribute This package was built from the source code at https://github.com/aspnet/AspNetCore/tree/33c2d01092d9a1b7a583fe99a50b15686e2b7de9

Microsoft.EntityFrameworkCore.Design The ID prefix of this package has been reserved for one of the owners of this package by NuGet.org.

Shared design-time components for Entity Framework Core tools.

Serilog.Settings.Configuration The ID prefix of this package has been reserved for one of the owners of this package by NuGet.org.

Microsoft.Extensions.Configuration (appsettings.json) support for Serilog.

Microsoft.EntityFrameworkCore.Sqlite.Core The ID prefix of this package has been reserved for one of the owners of this package by NuGet.org.

SQLite database provider for Entity Framework Core. This package does not include a copy of the native SQLite library.

Scrutor

Register services using assembly scanning and a fluent API.

GitHub repositories (141)

Showing the top 5 popular GitHub repositories that depend on Microsoft.Extensions.DependencyModel:

Repository Stars
dotnet/aspnetcore
ASP.NET Core is a cross-platform .NET framework for building modern cloud-based web applications on Windows, Mac, or Linux.
OpenRA/OpenRA
Open Source real-time strategy game engine for early Westwood games such as Command & Conquer: Red Alert written in C# using SDL and OpenGL. Runs on Windows, Linux, *BSD and Mac OS X.
dotnet/efcore
EF Core is a modern object-database mapper for .NET. It supports LINQ queries, change tracking, updates, and schema migrations.
dotnet/runtime
.NET is a cross-platform runtime for cloud, mobile, desktop, and IoT apps.
dotnet/orleans
Cloud Native application framework for .NET
Version Downloads Last updated
7.0.0 354,167 11/7/2022
7.0.0-rc.2.22472.3 59,310 10/11/2022
7.0.0-rc.1.22426.10 43,174 9/14/2022
7.0.0-preview.7.22375.6 16,788 8/9/2022
7.0.0-preview.6.22324.4 9,168 7/12/2022
7.0.0-preview.5.22301.12 13,321 6/14/2022
7.0.0-preview.4.22229.4 9,232 5/10/2022
7.0.0-preview.3.22175.4 4,166 4/13/2022
7.0.0-preview.2.22152.2 4,955 3/14/2022
7.0.0-preview.1.22076.8 8,577 2/17/2022
6.0.2-mauipre.1.22102.15 1,200 2/15/2022
6.0.2-mauipre.1.22054.8 4,541 1/19/2022
6.0.0 33,195,146 11/8/2021
6.0.0-rc.2.21480.5 136,540 10/12/2021
6.0.0-rc.1.21451.13 173,216 9/14/2021
6.0.0-preview.7.21377.19 26,695 8/10/2021
6.0.0-preview.6.21352.12 12,596 7/14/2021
6.0.0-preview.5.21301.5 14,100 6/15/2021
6.0.0-preview.4.21253.7 12,740 5/24/2021
6.0.0-preview.3.21201.4 18,173 4/8/2021
6.0.0-preview.2.21154.6 15,216 3/11/2021
6.0.0-preview.1.21102.12 9,980 2/12/2021
5.0.0 35,490,139 11/9/2020
5.0.0-rc.2.20475.5 78,845 10/13/2020
5.0.0-rc.1.20451.14 43,218 9/14/2020
5.0.0-preview.3-runtime... 43,531 4/23/2020
5.0.0-preview.2-runtime... 10,732 4/2/2020
5.0.0-preview.8.20407.11 30,793 8/25/2020
5.0.0-preview.7.20364.11 13,599 7/21/2020
5.0.0-preview.6.20305.6 4,326 6/25/2020
5.0.0-preview.5.20278.1 1,038 6/10/2020
5.0.0-preview.4.20251.6 5,539 5/18/2020
5.0.0-preview.1.20120.5 2,136 3/16/2020
3.1.25 875,390 5/10/2022
3.1.6 47,592,218 7/14/2020
3.1.5 6,412,823 6/9/2020
3.1.4 4,375,455 5/12/2020
3.1.3 12,160,072 3/24/2020
3.1.2 5,051,190 2/18/2020
3.1.1 4,934,737 1/14/2020
3.1.0 9,230,590 12/3/2019
3.1.0-preview3.19553.2 12,765 11/13/2019
3.1.0-preview2.19525.6 9,862 11/1/2019
3.1.0-preview1.19506.1 5,463 10/15/2019
3.0.3 134,914 2/18/2020
3.0.2 71,632 1/14/2020
3.0.1 365,627 11/18/2019
3.0.0 51,068,920 9/23/2019
3.0.0-rc1-19456-20 17,976 9/16/2019
3.0.0-preview9-19423-09 24,187 9/4/2019
3.0.0-preview8-28405-07 45,328 8/13/2019
3.0.0-preview7-27912-14 33,846 7/23/2019
3.0.0-preview6-27804-01 36,145 6/12/2019
3.0.0-preview5-27626-15 14,054 5/6/2019
3.0.0-preview4-27615-11 8,233 4/18/2019
3.0.0-preview3-27503-5 77,790 3/6/2019
3.0.0-preview-27324-5 25,178 1/29/2019
2.1.0 180,588,810 5/29/2018
2.1.0-rc1 105,268 5/6/2018
2.1.0-preview2-26406-04 212,415 4/10/2018
2.1.0-preview1-26216-03 102,624 2/26/2018
2.0.4 139,531,145 12/12/2017
2.0.3 24,655,331 11/14/2017
2.0.0 73,787,447 8/11/2017
2.0.0-preview2-25407-01 96,253 6/27/2017
2.0.0-preview1-002111 60,688 5/9/2017
1.1.9 963,014 7/10/2018
1.1.2 19,439,712 5/9/2017
1.1.1 5,300,564 3/6/2017
1.1.0 15,575,405 11/16/2016
1.1.0-preview1-001100 74,072 10/24/2016
1.0.500-preview2-1-003177 90,066 11/16/2016
1.0.3 80,523,768 3/6/2017
1.0.1-beta-000933 69,393 1/27/2017
1.0.0 59,585,819 6/27/2016
1.0.0-rc2-final 352,969 5/16/2016
1.0.0-rc2-002702 1,302,049 5/16/2016