Microsoft.Extensions.DependencyModel 9.0.7

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
Serilog.Settings.Configuration
Microsoft.Extensions.Configuration (appsettings.json) support for Serilog.
4,586
Microsoft.EntityFrameworkCore.Sqlite.Core
SQLite database provider for Entity Framework Core. This package does not include a copy of the native SQLite library.
4,361
Microsoft.EntityFrameworkCore.Design
Shared design-time components for Entity Framework Core tools.
1,042
Serilog.Settings.Configuration
Microsoft.Extensions.Configuration (appsettings.json) support for Serilog.
506
Microsoft.EntityFrameworkCore.Sqlite.Core
SQLite database provider for Entity Framework Core. This package does not include a copy of the native SQLite library.
506
Microsoft.EntityFrameworkCore.Sqlite.Core
SQLite database provider for Entity Framework Core. This package does not include a copy of the native SQLite library.
301
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/AspNetCore/tree/33c2d01092d9a1b7a583fe99a50b15686e2b7de9
87
IKVM
Java SE 8 Virtual Machine for .NET
84
IKVM
Java SE 8 Virtual Machine for .NET
83
IKVM
Java SE 8 Virtual Machine for .NET
78
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
77
IKVM
Java SE 8 Virtual Machine for .NET
77
IKVM
Java SE 8 Virtual Machine for .NET
75
IKVM
Java SE 8 Virtual Machine for .NET
74
IKVM
Java SE 8 Virtual Machine for .NET
73

https://go.microsoft.com/fwlink/?LinkID=799421

.NET Framework 4.6.2

.NET 8.0

.NET 9.0

  • No dependencies.

.NET Standard 2.0

Version Downloads Last updated
10.0.0-preview.6.25358.103 8 07/15/2025
10.0.0-preview.5.25277.114 7 06/22/2025
10.0.0-preview.4.25258.110 15 05/14/2025
10.0.0-preview.3.25171.5 19 04/13/2025
10.0.0-preview.2.25163.2 24 03/22/2025
10.0.0-preview.1.25080.5 19 02/25/2025
9.0.8 0 08/04/2025
9.0.7 5 07/14/2025
9.0.6 11 06/14/2025
9.0.5 19 05/15/2025
9.0.4 17 04/14/2025
9.0.3 24 03/14/2025
9.0.2 26 02/16/2025
9.0.1 21 01/20/2025
9.0.0 44 11/13/2024
9.0.0-rc.2.24473.5 30 10/16/2024
9.0.0-rc.1.24431.7 37 09/16/2024
9.0.0-preview.7.24405.7 34 08/14/2024
9.0.0-preview.6.24327.7 38 07/12/2024
9.0.0-preview.5.24306.7 39 06/11/2024
9.0.0-preview.4.24266.19 32 05/23/2024
9.0.0-preview.3.24172.9 35 04/12/2024
9.0.0-preview.2.24128.5 39 03/16/2024
9.0.0-preview.1.24080.9 37 02/22/2024
8.0.2 54 10/16/2024
8.0.1 35 07/12/2024
8.0.0 4,611 11/21/2023
8.0.0-rc.2.23479.6 53 10/10/2023
8.0.0-rc.1.23419.4 45 09/14/2023
8.0.0-preview.7.23375.6 48 08/29/2023
8.0.0-preview.6.23329.7 56 07/11/2023
8.0.0-preview.5.23280.8 54 06/20/2023
8.0.0-preview.4.23259.5 62 05/24/2023
8.0.0-preview.3.23174.8 48 07/02/2023
8.0.0-preview.2.23128.3 501 04/03/2023
8.0.0-preview.1.23110.8 69 05/24/2023
7.0.0 531 11/09/2022
7.0.0-rc.2.22472.3 52 07/12/2023
7.0.0-rc.1.22426.10 51 10/05/2022
7.0.0-preview.7.22375.6 49 08/10/2022
7.0.0-preview.6.22324.4 36 07/07/2023
7.0.0-preview.5.22301.12 44 06/20/2023
7.0.0-preview.4.22229.4 54 05/27/2022
7.0.0-preview.3.22175.4 60 05/17/2022
7.0.0-preview.2.22152.2 51 10/04/2022
7.0.0-preview.1.22076.8 46 03/06/2022
6.0.2 27 11/13/2024
6.0.2-mauipre.1.22102.15 43 07/11/2023
6.0.2-mauipre.1.22054.8 45 06/20/2023
6.0.1 50 10/16/2024
6.0.0 61 11/10/2021
6.0.0-rc.2.21480.5 45 07/03/2023
6.0.0-rc.1.21451.13 40 07/14/2023
6.0.0-preview.7.21377.19 50 07/09/2023
6.0.0-preview.6.21352.12 57 07/03/2023
6.0.0-preview.5.21301.5 55 06/11/2023
6.0.0-preview.4.21253.7 46 04/27/2023
6.0.0-preview.3.21201.4 42 07/03/2023
6.0.0-preview.2.21154.6 54 07/06/2023
6.0.0-preview.1.21102.12 56 06/29/2022
5.0.0 63 02/01/2021
5.0.0-rc.2.20475.5 55 06/28/2022
5.0.0-rc.1.20451.14 59 06/03/2022
5.0.0-preview.3-runtime.20214.6 52 07/10/2023
5.0.0-preview.2-runtime.20160.6 48 10/25/2022
5.0.0-preview.8.20407.11 43 06/20/2023
5.0.0-preview.7.20364.11 48 07/02/2023
5.0.0-preview.6.20305.6 52 05/11/2022
5.0.0-preview.5.20278.1 57 11/23/2022
5.0.0-preview.4.20251.6 60 10/18/2022
5.0.0-preview.1.20120.5 41 10/29/2022
3.1.25 48 05/11/2022
3.1.6 51 10/27/2022
3.1.5 45 03/17/2023
3.1.4 52 05/30/2022
3.1.3 50 11/09/2020
3.1.2 50 04/13/2023
3.1.1 55 06/17/2022
3.1.0 41 03/26/2023
3.1.0-preview3.19553.2 53 06/15/2022
3.1.0-preview2.19525.6 45 06/18/2022
3.1.0-preview1.19506.1 52 05/10/2022
3.0.3 49 10/31/2022
3.0.2 45 06/30/2022
3.0.1 45 03/29/2023
3.0.0 44 04/13/2023
3.0.0-rc1-19456-20 46 07/08/2023
3.0.0-preview9-19423-09 47 01/06/2023
3.0.0-preview8-28405-07 47 08/04/2022
3.0.0-preview7-27912-14 36 11/04/2022
3.0.0-preview6-27804-01 49 05/17/2023
3.0.0-preview5-27626-15 35 07/14/2023
3.0.0-preview4-27615-11 46 05/26/2023
3.0.0-preview3-27503-5 45 07/10/2023
3.0.0-preview-27324-5 54 07/01/2023
2.1.0 65 06/07/2022
2.1.0-rc1 57 07/03/2023
2.1.0-preview2-26406-04 55 05/15/2023
2.1.0-preview1-26216-03 55 06/04/2022
2.0.4 53 06/11/2022
2.0.3 50 01/20/2023
2.0.0 50 11/22/2021
2.0.0-preview2-25407-01 66 05/30/2022
2.0.0-preview1-002111 49 07/09/2023
1.1.9 53 09/23/2022
1.1.2 47 05/10/2023
1.1.1 54 12/02/2022
1.1.0 44 02/17/2023
1.1.0-preview1-001100 59 10/10/2022
1.0.500-preview2-1-003177 44 05/21/2023
1.0.3 45 05/16/2023
1.0.1-beta-000933 56 05/17/2023
1.0.0 55 06/11/2022
1.0.0-rc2-final 57 03/07/2023
1.0.0-rc2-002702 50 05/15/2022