Microsoft.Extensions.DependencyModel 10.0.4

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.

How to Use

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);
            }
        }
    }
}

Additional Documentation

Feedback & Contributing

Microsoft.Extensions.DependencyModel is released as open source under the MIT license. Bug reports and contributions are welcome at the GitHub repository.

Showing the top 20 packages that depend on Microsoft.Extensions.DependencyModel.

Packages Downloads
Castle.Windsor
Castle Windsor is best of breed, mature Inversion of Control container available for .NET.
6 648
Microsoft.AspNetCore.Mvc.Core
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/Mvc/tree/a6199bbfbab05583f987bae322fb04566841aaea
828
Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation
Runtime compilation support for Razor views and Razor Pages in ASP.NET Core MVC. This package was built from the source code at https://github.com/dotnet/aspnetcore/tree/159901324421e89ca7612465fc8c138609837f3d
275
Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation
Runtime compilation support for Razor views and Razor Pages in ASP.NET Core MVC. This package was built from the source code at https://github.com/dotnet/aspnetcore/tree/568fff703254def7dcd35fda9892bf702d4c81d3
365
Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation
Runtime compilation support for Razor views and Razor Pages in ASP.NET Core MVC. This package was built from the source code at https://github.com/dotnet/aspnetcore/tree/6254f5ca64f85b90327592dff67ea6b2ec0262c6
2 290
Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation
Runtime compilation support for Razor views and Razor Pages in ASP.NET Core MVC. This package was built from the source code at https://github.com/dotnet/aspnetcore/tree/c2a442982e736e17ae6bcadbfd8ccba278ee1be6
195
Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation
Runtime compilation support for Razor views and Razor Pages in ASP.NET Core MVC. This package was built from the source code at https://github.com/dotnet/aspnetcore/tree/c78f4a816c0c6a978a801a05a31dce9013e099e2
242
Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation
Runtime compilation support for Razor views and Razor Pages in ASP.NET Core MVC. This package was built from the source code at https://github.com/dotnet/aspnetcore/tree/ee417479933278bb5aadc5944706a96b5ef74a5d
513
Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation
Runtime compilation support for Razor views and Razor Pages in ASP.NET Core MVC. This package was built from the source code at https://github.com/dotnet/aspnetcore/tree/ef18546e04f9b0127bbd7709b6af054cc18da98a
293
Microsoft.EntityFrameworkCore.Design
Shared design-time components for Entity Framework Core tools.
1 164
Microsoft.EntityFrameworkCore.Design
Shared design-time components for Entity Framework Core tools.
1 266
Microsoft.EntityFrameworkCore.Design
Shared design-time components for Entity Framework Core tools.
2 135
Microsoft.EntityFrameworkCore.Sqlite
SQLite database provider for Entity Framework Core.
994
Microsoft.EntityFrameworkCore.Sqlite.Core
SQLite database provider for Entity Framework Core. This package does not include a copy of the native SQLite library.
992
Microsoft.VisualStudio.Web.CodeGeneration.Design
Code Generation tool for ASP.NET Core. Contains the dotnet-aspnet-codegenerator command used for generating controllers and views.
538
Serilog.Settings.Configuration
Microsoft.Extensions.Configuration (appsettings.json) support for Serilog.
349
Serilog.Settings.Configuration
Microsoft.Extensions.Configuration (appsettings.json) support for Serilog.
369
Serilog.Settings.Configuration
Microsoft.Extensions.Configuration (appsettings.json) support for Serilog.
2 004
Serilog.Settings.Configuration
Microsoft.Extensions.Configuration (appsettings.json) support for Serilog.
3 815
Serilog.Settings.Configuration
Microsoft.Extensions.Configuration (appsettings.json) support for Serilog.
6 326

.NET Framework 4.6.2

.NET 8.0

.NET 9.0

.NET 10.0

  • No dependencies.

.NET Standard 2.0

Version Downloads Last updated
11.0.0-preview.2.26159.112 0 2026-03-10
11.0.0-preview.1.26104.118 0 2026-02-10
10.0.5 7 2026-03-26
10.0.4 4 2026-03-16
10.0.3 13 2026-02-18
10.0.2 46 2026-02-12
10.0.1 0 2025-12-09
10.0.0 81 2026-02-18
10.0.0-rc.2.25502.107 0 2025-10-14
10.0.0-rc.1.25451.107 0 2025-09-09
10.0.0-preview.7.25380.108 0 2025-08-12
10.0.0-preview.6.25358.103 0 2025-07-15
10.0.0-preview.5.25277.114 0 2025-06-06
10.0.0-preview.4.25258.110 0 2025-05-12
10.0.0-preview.3.25171.5 0 2025-04-10
10.0.0-preview.2.25163.2 0 2025-03-18
10.0.0-preview.1.25080.5 0 2025-02-25
9.0.14 0 2026-03-10
9.0.13 0 2026-02-10
9.0.12 0 2026-01-13
9.0.11 1 2026-01-13
9.0.10 993 2025-11-06
9.0.9 937 2025-09-22
9.0.8 0 2025-08-04
9.0.7 0 2025-07-08
9.0.6 3 2025-08-12
9.0.5 0 2025-05-13
9.0.4 89 2025-04-14
9.0.3 16 2025-04-07
9.0.2 0 2025-02-11
9.0.1 0 2025-01-14
9.0.0 477 2025-01-20
9.0.0-rc.2.24473.5 38 2025-05-13
9.0.0-rc.1.24431.7 0 2024-09-10
9.0.0-preview.7.24405.7 0 2024-08-13
9.0.0-preview.6.24327.7 0 2024-07-09
9.0.0-preview.5.24306.7 0 2024-06-11
9.0.0-preview.4.24266.19 0 2024-05-21
9.0.0-preview.3.24172.9 0 2024-04-11
9.0.0-preview.2.24128.5 0 2024-03-12
9.0.0-preview.1.24080.9 0 2024-02-13
8.0.2 4 720 2025-02-27
8.0.1 6 105 2025-01-15
8.0.0 48 2025-04-01
8.0.0-rc.2.23479.6 0 2023-10-10
8.0.0-rc.1.23419.4 0 2023-09-12
8.0.0-preview.7.23375.6 0 2023-08-08
8.0.0-preview.6.23329.7 0 2023-07-11
8.0.0-preview.5.23280.8 0 2023-06-13
8.0.0-preview.4.23259.5 0 2023-05-16
8.0.0-preview.3.23174.8 0 2023-04-11
8.0.0-preview.2.23128.3 0 2023-03-14
8.0.0-preview.1.23110.8 0 2023-02-21
7.0.0 0 2022-11-07
7.0.0-rc.2.22472.3 0 2022-10-11
7.0.0-rc.1.22426.10 0 2022-09-14
7.0.0-preview.7.22375.6 0 2022-08-09
7.0.0-preview.6.22324.4 0 2022-07-12
7.0.0-preview.5.22301.12 0 2022-06-14
7.0.0-preview.4.22229.4 0 2022-05-10
7.0.0-preview.3.22175.4 0 2022-04-13
7.0.0-preview.2.22152.2 0 2022-03-14
7.0.0-preview.1.22076.8 0 2022-02-17
6.0.2 1 2025-09-18
6.0.1 15 2025-04-23
6.0.0 6 197 2025-01-15
6.0.0-rc.2.21480.5 0 2021-10-12
6.0.0-rc.1.21451.13 0 2021-09-14
6.0.0-preview.7.21377.19 0 2021-08-10
6.0.0-preview.6.21352.12 0 2021-07-14
6.0.0-preview.5.21301.5 0 2021-06-15
6.0.0-preview.4.21253.7 0 2021-05-24
6.0.0-preview.3.21201.4 0 2021-04-08
6.0.0-preview.2.21154.6 0 2021-03-11
6.0.0-preview.1.21102.12 0 2021-02-12
5.0.0 3 823 2025-02-27
5.0.0-rc.2.20475.5 0 2020-10-13
5.0.0-rc.1.20451.14 0 2020-09-14
5.0.0-preview.3-runtime.20214.6 0 2020-04-23
5.0.0-preview.2-runtime.20160.6 0 2020-04-02
5.0.0-preview.8.20407.11 0 2020-08-25
5.0.0-preview.7.20364.11 0 2020-07-21
5.0.0-preview.6.20305.6 0 2020-06-25
5.0.0-preview.5.20278.1 0 2020-06-10
5.0.0-preview.4.20251.6 0 2020-05-18
5.0.0-preview.1.20120.5 0 2020-03-16
3.1.25 0 2022-05-10
3.1.6 0 2020-07-14
3.1.5 0 2020-06-09
3.1.4 0 2020-05-12
3.1.3 0 2020-03-24
3.1.2 0 2020-02-18
3.1.1 0 2020-01-14
3.1.0 0 2019-12-03
3.1.0-preview3.19553.2 0 2019-11-13
3.1.0-preview2.19525.6 0 2019-11-01
3.1.0-preview1.19506.1 0 2019-10-15
3.0.3 0 2020-02-18
3.0.2 0 2020-01-14
3.0.1 0 2019-11-18
3.0.0 377 2025-02-26
3.0.0-rc1-19456-20 0 2019-09-16
3.0.0-preview9-19423-09 0 2019-09-04
3.0.0-preview8-28405-07 0 2019-08-13
3.0.0-preview7-27912-14 0 2019-07-23
3.0.0-preview6-27804-01 0 2019-06-12
3.0.0-preview5-27626-15 0 2019-05-06
3.0.0-preview4-27615-11 0 2019-04-18
3.0.0-preview3-27503-5 0 2019-03-06
3.0.0-preview-27324-5 0 2019-01-29
2.1.0 830 2025-03-10
2.1.0-rc1 0 2018-05-06
2.1.0-preview2-26406-04 0 2018-04-10
2.1.0-preview1-26216-03 0 2018-02-26
2.0.4 29 2025-02-27
2.0.3 0 2017-11-14
2.0.0 0 2017-08-11
2.0.0-preview2-25407-01 0 2017-06-27
2.0.0-preview1-002111 0 2017-05-09
1.1.9 0 2018-07-10
1.1.2 6 598 2025-01-15
1.1.1 0 2017-03-06
1.1.0 0 2016-11-16
1.1.0-preview1-001100 0 2016-10-24
1.0.500-preview2-1-003177 0 2016-11-16
1.0.3 0 2017-03-06
1.0.1-beta-000933 0 2017-01-27
1.0.0 0 2016-06-27
1.0.0-rc2-final 0 2016-05-16
1.0.0-rc2-002702 0 2016-05-16