Microsoft.Extensions.DependencyModel 9.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.

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,677
Microsoft.EntityFrameworkCore.Design
Shared design-time components for Entity Framework Core tools.
931
Serilog.Settings.Configuration
Microsoft.Extensions.Configuration (appsettings.json) support for Serilog.
806
Microsoft.DotNet.Scaffolding.Shared
Contains interfaces for Project Model and messaging for scaffolding.
786
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
402
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
371
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
344
Microsoft.DotNet.Scaffolding.Shared
Contains interfaces for Project Model and messaging for scaffolding.
170
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
154
Serilog.Settings.Configuration
Microsoft.Extensions.Configuration (appsettings.json) support for Serilog.
118
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
97
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
78
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
72
AntDesign.Charts
Package Description
48
AutoMapper.Extensions.Microsoft.DependencyInjection
AutoMapper extensions for ASP.NET Core
43
AutoMapper.Extensions.Microsoft.DependencyInjection
AutoMapper extensions for ASP.NET Core
40
AutoMapper.Extensions.Microsoft.DependencyInjection
AutoMapper extensions for ASP.NET Core
38
AutoMapper.Extensions.Microsoft.DependencyInjection
AutoMapper extensions for ASP.NET Core
37
Microsoft.DotNet.Cli.Utils
Package Description
37
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
36

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