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:

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
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/d4eca39c3fc1944b2c6431bf6b22036bdb176c0d
15
Lion.Abp.Extension
Package Description
12
Microsoft.EntityFrameworkCore.Design
Shared design-time components for Entity Framework Core tools.
9
Lion.Abp.Extension
Package Description
9
Lion.Abp.Extension
Package Description
8

https://go.microsoft.com/fwlink/?LinkID=799421

This package has no dependencies.

Version Downloads Last updated
8.0.0 14 2024/2/29
7.0.0 10 2023/8/10
6.0.0 11 2023/2/10
5.0.0 15 2021/9/28
3.1.6 8 2023/9/8
3.1.2 9 2023/9/9
3.1.0 10 2022/9/12
3.0.0 12 2022/8/29
2.1.0 12 2023/5/28
2.0.4 13 2021/9/28
1.0.0 8 2021/11/12