Microsoft.Extensions.DependencyModel 11.0.0-preview.1.26104.118
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.VisualStudio.Web.CodeGeneration.EntityFrameworkCore
Contains Entity Framework Core Services used by ASP.NET Core Code Generators.
|
2 |
|
RazorLight
Use Razor template engine to parse strings / files / EmbeddedResources for .NET Core
|
2 |
|
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.
|
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 |
|
RazorLight
Use Razor to build your templates from strings / files / EmbeddedResources outside of ASP.NET MVC for .NET Core
|
1 |
|
Microsoft.EntityFrameworkCore.Sqlite.Core
SQLite database provider for Entity Framework Core.
|
1 |
|
Serilog.Settings.Configuration
Microsoft.Extensions.Configuration (appsettings.json) support for Serilog.
|
1 |
|
RazorLight
Use Razor template engine to parse strings / files / EmbeddedResources for .NET Core
|
1 |
|
NSwag.Commands
NSwag: The OpenAPI/Swagger API toolchain for .NET and TypeScript
|
1 |
|
Microsoft.EntityFrameworkCore.Design
Shared design-time components for Entity Framework Core tools.
|
1 |
|
Microsoft.Orleans.Hosting.AzureCloudServices
Hosting utilities for Azure Cloud Services of Microsoft Orleans.
|
1 |
|
Microsoft.Orleans.Core.Abstractions
Core abstractions library of Microsoft Orleans
|
1 |
|
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/773e8cc3fbdc2c4ffbd57c1f53f21649ef94c35c
|
1 |
.NET Framework 4.6.2
- System.Text.Encodings.Web (>= 11.0.0-preview.1.26104.118)
- System.Text.Json (>= 11.0.0-preview.1.26104.118)
- System.Buffers (>= 4.6.1)
- System.Memory (>= 4.6.3)
.NET 10.0
- System.Text.Encodings.Web (>= 11.0.0-preview.1.26104.118)
- System.Text.Json (>= 11.0.0-preview.1.26104.118)
.NET 11.0
- No dependencies.
.NET Standard 2.0
- System.Text.Encodings.Web (>= 11.0.0-preview.1.26104.118)
- System.Text.Json (>= 11.0.0-preview.1.26104.118)
- System.Buffers (>= 4.6.1)
- System.Memory (>= 4.6.3)