Microsoft.Extensions.DependencyModel 10.0.0-preview.3.25171.5

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
FluentAssertions
A very extensive set of extension methods that allow you to more naturally specify the expected outcome of a TDD or BDD-style unit tests. Targets .NET Framework 4.5 and 4.7, as well as .NET Core 2.0, .NET Core 3.0, .NET Core 2.1, .NET Standard 1.3, 1.6, 2.0 and 2.1. Supports the unit test frameworks MSTest, MSTest2, Gallio, NUnit, XUnit, MBUnit, MSpec, and NSpec.
607
xunit.runner.visualstudio
Visual Studio 2012+ Test Explorer runner for the xUnit.net framework. Capable of running xUnit.net v1.9.2 and v2.0+ tests. Supported platforms: - Desktop .NET 2.0+ - .NET Core (including ASP.NET Core) 1.0+ - Universal Windows App 10+
84
Serilog.Settings.Configuration
Microsoft.Extensions.Configuration (appsettings.json) support for Serilog.
75
xunit.runner.visualstudio
Visual Studio 2012+ Test Explorer runner for the xUnit.net framework. Capable of running xUnit.net v1.9.2 and v2.0+ tests. Supports .NET 2.0 or later, .NET Core 1.0 or later, and Universal Windows 10.0 or later.
66
Serilog.Settings.Configuration
Microsoft.Extensions.Configuration (appsettings.json) support for Serilog.
63
Serilog.Settings.Configuration
Microsoft.Extensions.Configuration (appsettings.json) support for Serilog.
62
Microsoft.AspNetCore.App
Provides a default set of APIs for building an ASP.NET Core application. This package requires the ASP.NET Core runtime. This runtime is installed by the .NET Core SDK, or can be acquired separately using installers available at https://aka.ms/dotnet-download.
62
xunit.runner.visualstudio
Visual Studio 2012+ Test Explorer runner for the xUnit.net framework. Capable of running xUnit.net v1.9.2 and v2.0+ tests. Supported platforms: - Desktop .NET 2.0+ - .NET Core (including ASP.NET Core) 1.0+ - Universal Windows App 10+
61
Serilog.Settings.Configuration
Microsoft.Extensions.Configuration (appsettings.json) support for Serilog.
57
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/aspnet/AspNetCore/tree/471e4710a818849eaf22c5977281d10fd6758616
57
Serilog.Settings.Configuration
Microsoft.Extensions.Configuration (appsettings.json) support for Serilog.
56
Serilog.Settings.Configuration
Microsoft.Extensions.Configuration (appsettings.json) support for Serilog.
55
Microsoft.AspNetCore.Mvc.Testing
Support for writing functional tests for MVC applications. This package was built from the source code at https://github.com/aspnet/AspNetCore/tree/d27c0100bc8b9b93eb8102b097c20b40f7de9c49
54
Serilog.Settings.Configuration
Microsoft.Extensions.Configuration (appsettings.json) support for Serilog.
54
xunit.runner.visualstudio
Visual Studio 2012+ Test Explorer runner for the xUnit.net framework. Capable of running xUnit.net v1.9.2 and v2.0+ tests. Supported platforms: - Desktop .NET 2.0+ - .NET Core (including ASP.NET Core) 1.0+ - Universal Windows App 10+
54
Scrutor
Register services using assembly scanning and a fluent API.
53

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

.NET Framework 4.6.2

.NET Standard 2.0

.NET 10.0

  • No dependencies.

.NET 9.0

.NET 8.0

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