Microsoft.Extensions.DependencyModel 9.0.4
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 |
|---|---|
|
IKVM
Java SE 8 Virtual Machine for .NET
|
8 |
|
AntDesign.Charts
Package Description
|
7 |
|
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/379bfc7b2559e7cc9f42f997a497b2f2dd8e12d2
|
7 |
|
Ding.TimedJob
Ding.TimedJob是基于.net core平台开发的应用框架中的NetCore定时任务类库。
|
6 |
|
DH.Magicodes.IE.Core
DH框架的Excel处理库。基于Magicodes.IE.Excel
|
6 |
|
Silk.NET.Core
Silk.NET is a high-speed, advanced library, providing bindings to popular low-level APIs such as OpenGL, OpenCL, OpenAL, OpenXR, GLFW, SDL, Vulkan, Assimp, and DirectX.
|
6 |
|
Microsoft.VisualStudio.Web.CodeGeneration.EntityFrameworkCore
Contains Entity Framework Core Services used by ASP.NET Core Code Generators.
|
6 |
|
Microsoft.Orleans.Core
Core library of Microsoft Orleans used both on the client and server.
|
6 |
|
Silk.NET.Core
Silk.NET is a high-speed, advanced library, providing bindings to popular low-level APIs such as OpenGL, OpenCL, OpenAL, OpenXR, GLFW, SDL, Vulkan, Assimp, and DirectX.
|
5 |
|
Magicodes.IE.Core
Import and export general library, support Dto import and export, template export, fancy export and dynamic export, support Excel, Csv, Word, Pdf and Html.
导入导出通用库,支持Dto导入导出、模板导出、花式导出以及动态导出,支持Excel、Csv、Word、Pdf和Html。
开源库地址:https://github.com/xin-lai
博客地址:http://www.cnblogs.com/codelove/
更新记录:https://github.com/dotnetcore/Magicodes.IE/blob/master/RELEASE.md
公众号:麦扣聊技术
交流QQ群:85318032
|
5 |
|
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/f6b3a5da75eb405046889a5447ec9b14cc29d285
|
5 |
.NET Framework 4.6.2
- System.Text.Encodings.Web (>= 9.0.4)
- System.Text.Json (>= 9.0.4)
- System.Buffers (>= 4.5.1)
- System.Memory (>= 4.5.5)
.NET 8.0
- System.Text.Encodings.Web (>= 9.0.4)
- System.Text.Json (>= 9.0.4)
.NET 9.0
- No dependencies.
.NET Standard 2.0
- System.Text.Encodings.Web (>= 9.0.4)
- System.Text.Json (>= 9.0.4)
- System.Buffers (>= 4.5.1)
- System.Memory (>= 4.5.5)