Microsoft.Extensions.DependencyModel 7.0.0
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.
For more information, see the documentation:
- .deps.json file format
- Microsoft.Extensions.DependencyModel namespace
- Microsoft.Extensions.DependencyModel.DependencyContext
Example
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);
}
}
}
}
Showing the top 20 packages that depend on Microsoft.Extensions.DependencyModel.
Packages | Downloads |
---|---|
Castle.Windsor
Castle Windsor is best of breed, mature Inversion of Control container available for .NET.
|
34 |
Microsoft.EntityFrameworkCore.Sqlite.Core
SQLite database provider for Entity Framework Core. This package does not include a copy of the native SQLite library.
|
29 |
Castle.Windsor
Castle Windsor is best of breed, mature Inversion of Control container available for .NET.
|
28 |
Microsoft.EntityFrameworkCore.Sqlite.Core
SQLite database provider for Entity Framework Core. This package does not include a copy of the native SQLite library.
|
27 |
Castle.Windsor
Castle Windsor is best of breed, mature Inversion of Control container available for .NET.
|
27 |
Castle.Windsor
Castle Windsor is best of breed, mature Inversion of Control container available for .NET.
|
26 |
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/aee5e4080331553ea9dfb7fb388b6d72f715bf6a
|
26 |
Microsoft.EntityFrameworkCore.Sqlite.Core
SQLite database provider for Entity Framework Core.
|
26 |
Microsoft.EntityFrameworkCore.Sqlite.Core
SQLite database provider for Entity Framework Core. This package does not include a copy of the native SQLite library.
|
26 |
Microsoft.AspNetCore.Mvc.Testing
Support for writing functional tests for MVC applications.
This package was built from the source code at https://github.com/dotnet/aspnetcore/tree/3b519aa7d1a1b66e1d329d694f814e1d8228dc8c
|
26 |
Castle.Windsor
Castle Windsor is best of breed, mature Inversion of Control container available for .NET.
|
25 |
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/9699b939f94b7524a178821d78addefa5af5d750
|
25 |
Nuke.Build
The AKEless Build System for C#/.NET
Signed by signpath.io from repository 'https://github.com/nuke-build/nuke' commit '369ef2b8fd696c639b333812edf5c5fdd5f3e7e6' (see contained AppVeyorSettings.json file for build settings).
|
25 |
Microsoft.AspNetCore.Mvc.Testing
Support for writing functional tests for MVC applications.
This package was built from the source code at https://github.com/dotnet/aspnetcore/tree/e882394a7bb38930da748291fe2c2ceaa6a80588
|
25 |
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
|
25 |
.NET Framework 4.6.2
- System.Text.Encodings.Web (>= 7.0.0)
- System.Runtime.InteropServices.RuntimeInformation (>= 4.3.0)
- System.Memory (>= 4.5.5)
- System.Buffers (>= 4.5.1)
- System.Text.Json (>= 7.0.0)
.NET Standard 2.0
- System.Memory (>= 4.5.5)
- System.Buffers (>= 4.5.1)
- System.Text.Json (>= 7.0.0)
- System.Text.Encodings.Web (>= 7.0.0)
.NET 7.0
- System.Text.Encodings.Web (>= 7.0.0)
- System.Text.Json (>= 7.0.0)
.NET 6.0
- System.Text.Encodings.Web (>= 7.0.0)
- System.Text.Json (>= 7.0.0)