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
- .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 |
|---|---|
|
Serilog.Settings.Configuration
Microsoft.Extensions.Configuration (appsettings.json) support for Serilog.
|
134 |
|
Microsoft.EntityFrameworkCore.Sqlite
SQLite database provider for Entity Framework Core.
|
120 |
|
Microsoft.EntityFrameworkCore.Sqlite.Core
SQLite database provider for Entity Framework Core. This package does not include a copy of the native SQLite library.
|
119 |
|
Microsoft.EntityFrameworkCore.Design
Shared design-time components for Entity Framework Core tools.
|
118 |
|
Microsoft.EntityFrameworkCore.Design
Shared design-time components for Entity Framework Core tools.
|
15 |
|
Microsoft.EntityFrameworkCore.Sqlite
SQLite database provider for Entity Framework Core.
|
13 |
|
Microsoft.EntityFrameworkCore.Sqlite.Core
SQLite database provider for Entity Framework Core. This package does not include a copy of the native SQLite library.
|
13 |
|
Microsoft.VisualStudio.Web.CodeGeneration.Utils
Contains utilities used by ASP.NET Core Code Generation packages.
|
3 |
|
Microsoft.DotNet.Scaffolding.Shared
Contains interfaces for Project Model and messaging for scaffolding.
|
3 |
|
Microsoft.VisualStudio.Web.CodeGeneration.Design
Code Generation tool for ASP.NET Core. Contains the dotnet-aspnet-codegenerator command used for generating controllers and views.
|
2 |
|
Microsoft.VisualStudio.Web.CodeGenerators.Mvc
Code Generators for ASP.NET Core MVC. Contains code generators for MVC Controllers and Views.
|
2 |
|
NSwag.Commands
NSwag: The OpenAPI/Swagger API toolchain for .NET and TypeScript
|
2 |
|
Microsoft.AspNetCore.All
Provides a default set of APIs for building an ASP.NET Core application, and also includes API for third-party integrations with ASP.NET Core.
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.
|
1 |
|
Microsoft.EntityFrameworkCore.Design
Shared design-time components for Entity Framework Core tools.
|
1 |
|
Microsoft.TestPlatform.TestHost
Testplatform host executes the test using specified adapter.
|
1 |
|
Microsoft.EntityFrameworkCore.Sqlite.Core
SQLite database provider for Entity Framework Core. This package does not include a copy of the native SQLite library.
|
1 |
|
Microsoft.EntityFrameworkCore.Sqlite
SQLite database provider for Entity Framework Core.
|
1 |
|
Microsoft.VisualStudio.Web.CodeGeneration.Core
Contains the core infrastructure used by ASP.NET Core Code Generators.
|
1 |
|
Microsoft.EntityFrameworkCore.Sqlite.Core
SQLite database provider for Entity Framework Core.
|
1 |
.NET Framework 4.6.2
- System.Text.Encodings.Web (>= 10.0.0-preview.3.25171.5)
- System.Text.Json (>= 10.0.0-preview.3.25171.5)
- System.Buffers (>= 4.6.0)
- System.Memory (>= 4.6.0)
.NET 8.0
- System.Text.Encodings.Web (>= 10.0.0-preview.3.25171.5)
- System.Text.Json (>= 10.0.0-preview.3.25171.5)
.NET 9.0
- System.Text.Encodings.Web (>= 10.0.0-preview.3.25171.5)
- System.Text.Json (>= 10.0.0-preview.3.25171.5)
.NET 10.0
- No dependencies.
.NET Standard 2.0
- System.Text.Encodings.Web (>= 10.0.0-preview.3.25171.5)
- System.Text.Json (>= 10.0.0-preview.3.25171.5)
- System.Buffers (>= 4.6.0)
- System.Memory (>= 4.6.0)
| Version | Downloads | Last updated |
|---|---|---|
| 10.0.0-preview.3.25171.5 | 1 | 12/20/2025 |
| 9.0.9 | 16 | 12/20/2025 |
| 9.0.8 | 1 | 12/20/2025 |
| 9.0.4 | 119 | 12/19/2025 |
| 9.0.0 | 134 | 12/19/2025 |
| 9.0.0-rc.2.24473.5 | 2 | 12/20/2025 |
| 9.0.0-preview.2.24128.5 | 1 | 12/20/2025 |