Microsoft.Extensions.DependencyModel 9.0.0-preview.6.24327.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
- .deps.json file format
- Microsoft.Extensions.DependencyModel namespace
- Microsoft.Extensions.DependencyModel.DependencyContext
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 |
---|---|
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
|
1,039 |
Microsoft.EntityFrameworkCore.Design
Shared design-time components for Entity Framework Core tools.
|
1,506 |
Microsoft.TestPlatform.TestHost
Testplatform host executes the test using specified adapter.
|
58 |
Microsoft.TestPlatform.TestHost
Testplatform host executes the test using specified adapter.
|
64 |
Microsoft.TestPlatform.TestHost
Testplatform host executes the test using specified adapter.
|
68 |
Microsoft.TestPlatform.TestHost
Testplatform host executes the test using specified adapter.
|
70 |
Scrutor
Register services using assembly scanning and a fluent API.
|
9,745 |
Serilog.Settings.Configuration
Microsoft.Extensions.Configuration (appsettings.json) support for Serilog.
|
59 |
Serilog.Settings.Configuration
Microsoft.Extensions.Configuration (appsettings.json) support for Serilog.
|
63 |
Serilog.Settings.Configuration
Microsoft.Extensions.Configuration (appsettings.json) support for Serilog.
|
10,522 |
Serilog.Settings.Configuration
Microsoft.Extensions.Configuration (appsettings.json) support for Serilog.
|
14,444 |
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+
|
64 |
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+
|
68 |
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+
|
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.
Supported platforms:
- Desktop .NET 2.0+
- .NET Core (including ASP.NET Core) 1.0+
- Universal Windows App 10+
|
78 |
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+
|
85 |
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+
|
86 |
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+
- Windows App 8.1
- Windows Phone App 8.1
|
83 |
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.
|
70 |
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.
|
98 |
.NET Framework 4.6.2
- System.Text.Encodings.Web (>= 9.0.0-preview.6.24327.7)
- System.Memory (>= 4.5.5)
- System.Buffers (>= 4.5.1)
- System.Text.Json (>= 9.0.0-preview.6.24327.7)
.NET Standard 2.0
- System.Memory (>= 4.5.5)
- System.Buffers (>= 4.5.1)
- System.Text.Json (>= 9.0.0-preview.6.24327.7)
- System.Text.Encodings.Web (>= 9.0.0-preview.6.24327.7)
.NET 9.0
- System.Text.Json (>= 9.0.0-preview.6.24327.7)
- System.Text.Encodings.Web (>= 9.0.0-preview.6.24327.7)
.NET 8.0
- System.Text.Encodings.Web (>= 9.0.0-preview.6.24327.7)
- System.Text.Json (>= 9.0.0-preview.6.24327.7)