Microsoft.Extensions.DependencyModel 9.0.0-preview.3.24172.9

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.
596
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+
72
Serilog.Settings.Configuration
Microsoft.Extensions.Configuration (appsettings.json) support for Serilog.
57
Serilog.Settings.Configuration
Microsoft.Extensions.Configuration (appsettings.json) support for Serilog.
51
Serilog.Settings.Configuration
Microsoft.Extensions.Configuration (appsettings.json) support for Serilog.
50
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.
50
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+
48
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
47
Serilog.Settings.Configuration
Microsoft.Extensions.Configuration (appsettings.json) support for Serilog.
47
Serilog.Settings.Configuration
Microsoft.Extensions.Configuration (appsettings.json) support for Serilog.
46
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.
46
Serilog.Settings.Configuration
Microsoft.Extensions.Configuration (appsettings.json) support for Serilog.
45
Serilog.Settings.Configuration
Microsoft.Extensions.Configuration (appsettings.json) support for Serilog.
44
Serilog.Settings.Configuration
Microsoft.Extensions.Configuration (appsettings.json) support for Serilog.
43

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

.NET Framework 4.6.2

.NET Standard 2.0

.NET 9.0

.NET 8.0

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