Microsoft.Extensions.DependencyModel 9.0.1

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.
1,684
Microsoft.EntityFrameworkCore.Design
Shared design-time components for Entity Framework Core tools.
1,000
Microsoft.DotNet.Scaffolding.Shared
Contains interfaces for Project Model and messaging for scaffolding.
854
Serilog.Settings.Configuration
Microsoft.Extensions.Configuration (appsettings.json) support for Serilog.
808
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/dc5e11abdb05b322f4b74b3afbcfb352fe984b2e
408
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/ae1a6cbe225b99c0bf38b7e31bf60cb653b73a52
377
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/68bb6fb08f8f85bb3cf08953a0d2f4a254eaccff
352
Microsoft.DotNet.Scaffolding.Shared
Contains interfaces for Project Model and messaging for scaffolding.
175
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/fc93e595ceffbb1e3e85532bf454e92a6a80dd6b
160
Serilog.Settings.Configuration
Microsoft.Extensions.Configuration (appsettings.json) support for Serilog.
122
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/e882394a7bb38930da748291fe2c2ceaa6a80588
103
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/d827c653b787c07de908240b7746ce34d3e6271e
83
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/3f1acb59718cadf111a0a796681e3d3509bb3381
77
AntDesign.Charts
Package Description
53
AutoMapper.Extensions.Microsoft.DependencyInjection
AutoMapper extensions for ASP.NET Core
49
AutoMapper.Extensions.Microsoft.DependencyInjection
AutoMapper extensions for ASP.NET Core
46
AutoMapper.Extensions.Microsoft.DependencyInjection
AutoMapper extensions for ASP.NET Core
45
Microsoft.DotNet.Cli.Utils
Package Description
45
AutoMapper.Extensions.Microsoft.DependencyInjection
AutoMapper extensions for ASP.NET Core
42

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
9.0.1 4 01/19/2025
9.0.0 13 11/13/2024
9.0.0-rc.2.24473.5 10 10/11/2024
9.0.0-rc.1.24431.7 19 09/11/2024
9.0.0-preview.7.24405.7 18 08/16/2024
9.0.0-preview.6.24327.7 17 07/10/2024
9.0.0-preview.5.24306.7 20 06/19/2024
9.0.0-preview.4.24266.19 18 06/07/2024
9.0.0-preview.3.24172.9 21 04/13/2024
9.0.0-preview.2.24128.5 22 03/14/2024
9.0.0-preview.1.24080.9 22 02/26/2024
8.0.2 16 10/08/2024
8.0.1 15 07/12/2024
8.0.0 1,050 11/15/2023
8.0.0-rc.2.23479.6 23 10/11/2023
8.0.0-rc.1.23419.4 21 09/29/2023
8.0.0-preview.7.23375.6 21 08/14/2023
8.0.0-preview.6.23329.7 25 08/22/2023
8.0.0-preview.5.23280.8 23 06/25/2023
8.0.0-preview.4.23259.5 21 09/25/2023
8.0.0-preview.3.23174.8 23 06/20/2023
8.0.0-preview.2.23128.3 21 08/16/2023
8.0.0-preview.1.23110.8 30 08/07/2023
7.0.0 27 10/02/2023
7.0.0-rc.2.22472.3 23 06/19/2023
7.0.0-rc.1.22426.10 19 12/01/2023
7.0.0-preview.7.22375.6 20 10/26/2023
7.0.0-preview.6.22324.4 19 11/27/2023
7.0.0-preview.5.22301.12 20 10/03/2023
7.0.0-preview.4.22229.4 27 08/07/2023
7.0.0-preview.3.22175.4 23 06/30/2023
7.0.0-preview.2.22152.2 30 06/20/2023
7.0.0-preview.1.22076.8 28 07/14/2023
6.0.2 12 11/13/2024
6.0.2-mauipre.1.22102.15 19 09/15/2023
6.0.2-mauipre.1.22054.8 22 11/26/2023
6.0.1 15 10/08/2024
6.0.0 694 11/12/2021
6.0.0-rc.2.21480.5 19 10/20/2023
6.0.0-rc.1.21451.13 23 07/18/2023
6.0.0-preview.7.21377.19 23 12/02/2023
6.0.0-preview.6.21352.12 24 08/07/2023
6.0.0-preview.5.21301.5 27 08/07/2023
6.0.0-preview.4.21253.7 29 07/31/2023
6.0.0-preview.3.21201.4 19 08/07/2023
6.0.0-preview.2.21154.6 23 08/07/2023
6.0.0-preview.1.21102.12 26 12/01/2023
5.0.0 683 12/16/2020
5.0.0-rc.2.20475.5 22 09/09/2023
5.0.0-rc.1.20451.14 23 10/15/2023
5.0.0-preview.3-runtime.20214.6 20 10/16/2023
5.0.0-preview.2-runtime.20160.6 23 10/06/2023
5.0.0-preview.8.20407.11 20 10/09/2023
5.0.0-preview.7.20364.11 19 08/18/2023
5.0.0-preview.6.20305.6 21 11/26/2023
5.0.0-preview.5.20278.1 20 09/27/2023
5.0.0-preview.4.20251.6 23 08/31/2023
5.0.0-preview.1.20120.5 19 11/26/2023
3.1.25 27 09/14/2023
3.1.6 22 09/30/2023
3.1.5 25 06/20/2023
3.1.4 22 08/27/2023
3.1.3 26 10/21/2023
3.1.2 22 07/18/2023
3.1.1 24 12/25/2023
3.1.0 21 07/17/2023
3.1.0-preview3.19553.2 22 10/11/2023
3.1.0-preview2.19525.6 18 11/27/2023
3.1.0-preview1.19506.1 22 07/11/2023
3.0.3 22 10/03/2023
3.0.2 26 10/07/2023
3.0.1 22 10/03/2023
3.0.0 808 05/08/2023
3.0.0-rc1-19456-20 21 10/27/2023
3.0.0-preview9-19423-09 24 10/28/2023
3.0.0-preview8-28405-07 22 10/15/2023
3.0.0-preview7-27912-14 27 10/03/2023
3.0.0-preview6-27804-01 21 10/27/2023
3.0.0-preview5-27626-15 24 10/28/2023
3.0.0-preview4-27615-11 24 10/12/2023
3.0.0-preview3-27503-5 20 10/24/2023
3.0.0-preview-27324-5 23 10/17/2023
2.1.0 34 04/14/2021
2.1.0-rc1 24 11/05/2023
2.1.0-preview2-26406-04 21 10/27/2023
2.1.0-preview1-26216-03 22 10/04/2023
2.0.4 1,694 04/16/2021
2.0.3 24 10/16/2023
2.0.0 56 01/22/2021
2.0.0-preview2-25407-01 28 10/03/2023
2.0.0-preview1-002111 25 10/15/2023
1.1.9 21 10/08/2023
1.1.2 24 09/19/2023
1.1.1 23 10/01/2023
1.1.0 22 10/04/2023
1.1.0-preview1-001100 25 10/15/2023
1.0.500-preview2-1-003177 23 10/12/2023
1.0.3 26 09/27/2023
1.0.1-beta-000933 23 10/03/2023
1.0.0 24 08/22/2023
1.0.0-rc2-final 26 09/15/2023
1.0.0-rc2-002702 23 10/15/2023