Microsoft.Extensions.DependencyModel
9.0.0
Prefix Reserved
dotnet add package Microsoft.Extensions.DependencyModel --version 9.0.0
NuGet\Install-Package Microsoft.Extensions.DependencyModel -Version 9.0.0
<PackageReference Include="Microsoft.Extensions.DependencyModel" Version="9.0.0" />
paket add Microsoft.Extensions.DependencyModel --version 9.0.0
#r "nuget: Microsoft.Extensions.DependencyModel, 9.0.0"
// Install Microsoft.Extensions.DependencyModel as a Cake Addin #addin nuget:?package=Microsoft.Extensions.DependencyModel&version=9.0.0 // Install Microsoft.Extensions.DependencyModel as a Cake Tool #tool nuget:?package=Microsoft.Extensions.DependencyModel&version=9.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.
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.
Product | Versions 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. |
.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. |
-
.NETFramework 4.6.2
- System.Buffers (>= 4.5.1)
- System.Memory (>= 4.5.5)
- System.Text.Encodings.Web (>= 9.0.0)
- System.Text.Json (>= 9.0.0)
-
.NETStandard 2.0
- System.Buffers (>= 4.5.1)
- System.Memory (>= 4.5.5)
- System.Text.Encodings.Web (>= 9.0.0)
- System.Text.Json (>= 9.0.0)
-
net8.0
- System.Text.Encodings.Web (>= 9.0.0)
- System.Text.Json (>= 9.0.0)
-
net9.0
- No dependencies.
NuGet packages (1.2K)
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 This package was built from the source code at https://github.com/aspnet/AspNetCore/tree/33c2d01092d9a1b7a583fe99a50b15686e2b7de9 |
|
Microsoft.EntityFrameworkCore.Design
Shared design-time components for Entity Framework Core tools. |
|
Serilog.Settings.Configuration
Microsoft.Extensions.Configuration (appsettings.json) support for Serilog. |
|
Microsoft.VisualStudio.Web.CodeGenerators.Mvc
Code Generators for ASP.NET Core MVC. Contains code generators for MVC Controllers and Views. |
|
Microsoft.VisualStudio.Web.CodeGeneration.Design
Code Generation tool for ASP.NET Core. Contains the dotnet-aspnet-codegenerator command used for generating controllers and views. |
GitHub repositories (172)
Showing the top 5 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
|
Version | Downloads | Last updated | |
---|---|---|---|
9.0.0 | 2,399,157 | 11/12/2024 | |
9.0.0-rc.2.24473.5 | 367,518 | 10/8/2024 | |
9.0.0-rc.1.24431.7 | 83,785 | 9/10/2024 | |
9.0.0-preview.7.24405.7 | 36,270 | 8/13/2024 | |
9.0.0-preview.6.24327.7 | 37,229 | 7/9/2024 | |
9.0.0-preview.5.24306.7 | 20,686 | 6/11/2024 | |
9.0.0-preview.4.24266.19 | 25,723 | 5/21/2024 | |
9.0.0-preview.3.24172.9 | 132,922 | 4/11/2024 | |
9.0.0-preview.2.24128.5 | 38,031 | 3/12/2024 | |
9.0.0-preview.1.24080.9 | 66,465 | 2/13/2024 | |
8.0.2 | 14,970,436 | 10/8/2024 | |
8.0.1 | 29,563,744 | 7/9/2024 | |
8.0.0 | 93,369,742 | 11/14/2023 | |
8.0.0-rc.2.23479.6 | 167,319 | 10/10/2023 | |
8.0.0-rc.1.23419.4 | 140,723 | 9/12/2023 | |
8.0.0-preview.7.23375.6 | 55,042 | 8/8/2023 | |
8.0.0-preview.6.23329.7 | 94,920 | 7/11/2023 | |
8.0.0-preview.5.23280.8 | 106,843 | 6/13/2023 | |
8.0.0-preview.4.23259.5 | 262,680 | 5/16/2023 | |
8.0.0-preview.3.23174.8 | 105,131 | 4/11/2023 | |
8.0.0-preview.2.23128.3 | 57,505 | 3/14/2023 | |
8.0.0-preview.1.23110.8 | 106,001 | 2/21/2023 | |
7.0.0 | 113,239,118 | 11/7/2022 | |
7.0.0-rc.2.22472.3 | 184,814 | 10/11/2022 | |
7.0.0-rc.1.22426.10 | 95,483 | 9/14/2022 | |
7.0.0-preview.7.22375.6 | 50,589 | 8/9/2022 | |
7.0.0-preview.6.22324.4 | 31,776 | 7/12/2022 | |
7.0.0-preview.5.22301.12 | 15,851 | 6/14/2022 | |
7.0.0-preview.4.22229.4 | 13,782 | 5/10/2022 | |
7.0.0-preview.3.22175.4 | 5,833 | 4/13/2022 | |
7.0.0-preview.2.22152.2 | 8,029 | 3/14/2022 | |
7.0.0-preview.1.22076.8 | 13,236 | 2/17/2022 | |
6.0.2 | 95,193 | 11/12/2024 | |
6.0.1 | 259,810 | 10/8/2024 | |
6.0.0 | 169,604,224 | 11/8/2021 | |
6.0.0-rc.2.21480.5 | 233,234 | 10/12/2021 | |
6.0.0-rc.1.21451.13 | 206,107 | 9/14/2021 | |
6.0.0-preview.7.21377.19 | 32,229 | 8/10/2021 | |
6.0.0-preview.6.21352.12 | 14,196 | 7/14/2021 | |
6.0.0-preview.5.21301.5 | 17,825 | 6/15/2021 | |
6.0.0-preview.4.21253.7 | 14,133 | 5/24/2021 | |
6.0.0-preview.3.21201.4 | 28,116 | 4/8/2021 | |
6.0.0-preview.2.21154.6 | 16,865 | 3/11/2021 | |
6.0.0-preview.1.21102.12 | 12,005 | 2/12/2021 | |
5.0.0 | 69,087,269 | 11/9/2020 | |
5.0.0-rc.2.20475.5 | 92,369 | 10/13/2020 | |
5.0.0-rc.1.20451.14 | 51,728 | 9/14/2020 | |
5.0.0-preview.3-runtime... | 47,141 | 4/23/2020 | |
5.0.0-preview.2-runtime... | 11,410 | 4/2/2020 | |
5.0.0-preview.8.20407.11 | 32,976 | 8/25/2020 | |
5.0.0-preview.7.20364.11 | 14,490 | 7/21/2020 | |
5.0.0-preview.6.20305.6 | 5,438 | 6/25/2020 | |
5.0.0-preview.5.20278.1 | 1,381 | 6/10/2020 | |
5.0.0-preview.4.20251.6 | 6,725 | 5/18/2020 | |
5.0.0-preview.1.20120.5 | 2,762 | 3/16/2020 | |
3.1.25 | 5,051,129 | 5/10/2022 | |
3.1.6 | 101,269,765 | 7/14/2020 | |
3.1.5 | 8,937,324 | 6/9/2020 | |
3.1.4 | 5,632,097 | 5/12/2020 | |
3.1.3 | 16,273,689 | 3/24/2020 | |
3.1.2 | 7,240,037 | 2/18/2020 | |
3.1.1 | 6,691,685 | 1/14/2020 | |
3.1.0 | 12,715,647 | 12/3/2019 | |
3.1.0-preview3.19553.2 | 15,061 | 11/13/2019 | |
3.1.0-preview2.19525.6 | 10,393 | 11/1/2019 | |
3.1.0-preview1.19506.1 | 6,103 | 10/15/2019 | |
3.0.3 | 193,575 | 2/18/2020 | |
3.0.2 | 89,909 | 1/14/2020 | |
3.0.1 | 517,205 | 11/18/2019 | |
3.0.0 | 187,423,597 | 9/23/2019 | |
3.0.0-rc1-19456-20 | 19,445 | 9/16/2019 | |
3.0.0-preview9-19423-09 | 32,785 | 9/4/2019 | |
3.0.0-preview8-28405-07 | 53,318 | 8/13/2019 | |
3.0.0-preview7-27912-14 | 37,897 | 7/23/2019 | |
3.0.0-preview6-27804-01 | 47,185 | 6/12/2019 | |
3.0.0-preview5-27626-15 | 17,172 | 5/6/2019 | |
3.0.0-preview4-27615-11 | 14,464 | 4/18/2019 | |
3.0.0-preview3-27503-5 | 82,737 | 3/6/2019 | |
3.0.0-preview-27324-5 | 34,304 | 1/29/2019 | |
2.1.0 | 437,188,446 | 5/29/2018 | |
2.1.0-rc1 | 153,369 | 5/6/2018 | |
2.1.0-preview2-26406-04 | 350,031 | 4/10/2018 | |
2.1.0-preview1-26216-03 | 172,597 | 2/26/2018 | |
2.0.4 | 209,344,318 | 12/12/2017 | |
2.0.3 | 34,978,841 | 11/14/2017 | |
2.0.0 | 92,376,092 | 8/11/2017 | |
2.0.0-preview2-25407-01 | 133,422 | 6/27/2017 | |
2.0.0-preview1-002111 | 77,292 | 5/9/2017 | |
1.1.9 | 1,633,306 | 7/10/2018 | |
1.1.2 | 38,543,648 | 5/9/2017 | |
1.1.1 | 6,963,543 | 3/6/2017 | |
1.1.0 | 32,758,216 | 11/16/2016 | |
1.1.0-preview1-001100 | 119,759 | 10/24/2016 | |
1.0.500-preview2-1-003177 | 122,118 | 11/16/2016 | |
1.0.3 | 121,428,005 | 3/6/2017 | |
1.0.1-beta-000933 | 94,712 | 1/27/2017 | |
1.0.0 | 74,017,830 | 6/27/2016 | |
1.0.0-rc2-final | 432,729 | 5/16/2016 | |
1.0.0-rc2-002702 | 1,313,660 | 5/16/2016 |