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

Feedback & Contributing

Microsoft.Extensions.DependencyModel is released as open source under the MIT license. Bug reports and contributions are welcome at the GitHub repository.

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 is compatible.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net461 was computed.  net462 is compatible.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 

NuGet packages (1.5K)

Showing the top 5 NuGet packages that depend on Microsoft.Extensions.DependencyModel:

Package Downloads
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

Microsoft.EntityFrameworkCore.Design

Shared design-time components for Entity Framework Core tools.

Serilog.Settings.Configuration

Microsoft.Extensions.Configuration (appsettings.json) support for Serilog.

Microsoft.EntityFrameworkCore.Sqlite.Core

SQLite database provider for Entity Framework Core. This package does not include a copy of the native SQLite library.

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/dotnet/tree/87bc0b04e21d786669142109a5128c95618b75ed

GitHub repositories (180)

Showing the top 20 popular GitHub repositories that depend on Microsoft.Extensions.DependencyModel:

Repository Stars
dotnet/aspnetcore

ASP.NET Core is a cross-platform .NET framework for building modern cloud-based web applications on Windows, Mac, or Linux.

dotnet/runtime

.NET is a cross-platform runtime for cloud, mobile, desktop, and IoT apps.

OpenRA/OpenRA

Open Source real-time strategy game engine for early Westwood games such as Command & Conquer: Red Alert written in C# using SDL and OpenGL. Runs on Windows, Linux, *BSD and Mac OS X.

dotnet/efcore

EF Core is a modern object-database mapper for .NET. It supports LINQ queries, change tracking, updates, and schema migrations.

dotnet/orleans

Cloud Native application framework for .NET

mRemoteNG/mRemoteNG

mRemoteNG is the next generation of mRemote, open source, tabbed, multi-protocol, remote connections manager.

dotnet/machinelearning

ML.NET is an open source and cross-platform machine learning framework for .NET.

stride3d/stride

Stride (formerly Xenko), a free and open-source cross-platform C# game engine.

NancyFx/Nancy

Lightweight, low-ceremony, framework for building HTTP based services on .Net and Mono

aspnet/Mvc

[Archived] ASP.NET Core MVC is a model view controller framework for building dynamic web sites with clean separation of concerns, including the merged MVC, Web API, and Web Pages w/ Razor. Project moved to https://github.com/aspnet/AspNetCore

MapsterMapper/Mapster

A fast, fun and stimulating object to object Mapper

dotnet/Silk.NET

The high-speed OpenGL, OpenCL, OpenAL, OpenXR, GLFW, SDL, Vulkan, Assimp, WebGPU, and DirectX bindings library your mother warned you about.

tixl3d/tixl

TiXL is an open source software to create realtime motion graphics.

khellang/Scrutor

Assembly scanning and decoration extensions for Microsoft.Extensions.DependencyInjection

cq-panda/Vue.NetCore

(已支持sqlsugar).NetCore、.Net6、Vue2、Vue3、Vite、TypeScript、Element plus+uniapp前后端分离,全自动生成代码;支持移动端(ios/android/h5/微信小程序。http://www.volcore.xyz/

nuke-build/nuke

🏗 The AKEless Build System for C#/.NET

waf/CSharpRepl

A command line C# REPL with syntax highlighting – explore the language, libraries and nuget packages interactively.

microsurging/surging

Surging is a micro-service engine that provides a lightweight, high-performance, modular RPC request pipeline. support Event-based Asynchronous Pattern and reactive programming.

linq2db/linq2db

Linq to database provider.

coverlet-coverage/coverlet

Cross platform code coverage for .NET

Version Downloads Last Updated
11.0.0-preview.1.26104.118 2,891 2/10/2026
10.0.3 1,704,738 2/10/2026
10.0.2 4,586,297 1/13/2026
10.0.1 4,150,749 12/9/2025
10.0.0 14,376,751 11/11/2025
10.0.0-rc.2.25502.107 155,175 10/14/2025
10.0.0-rc.1.25451.107 168,892 9/9/2025
10.0.0-preview.7.25380.108 49,525 8/12/2025
10.0.0-preview.6.25358.103 19,372 7/15/2025
10.0.0-preview.5.25277.114 35,507 6/6/2025
10.0.0-preview.4.25258.110 28,907 5/12/2025
9.0.13 270,912 2/10/2026
9.0.12 834,253 1/13/2026
9.0.11 3,619,760 11/11/2025
9.0.10 6,777,526 10/14/2025
9.0.9 8,714,050 9/9/2025
9.0.8 7,604,378 8/4/2025
9.0.7 5,800,869 7/8/2025
9.0.6 7,016,437 6/10/2025
9.0.5 8,140,381 5/13/2025