dotnet\shared vs dotnet\packs\ref\ reference assembly vs runtime assembly
dotnet\shared vs dotnet\packs\ref\
C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App\6.0.16\Microsoft.AspNetCore.Identity.dll
C:\Program Files\dotnet\packs\Microsoft.AspNetCore.App.Ref\6.0.16\ref\net6.0\Microsoft.AspNetCore.Identity.dll
The paths you provided indicate the location of the Microsoft.AspNetCore.Identity.dll
assembly files on your system. These files are part of the Microsoft.AspNetCore.Identity package, which provides the implementation for user authentication and authorization in ASP.NET Core applications.
The Microsoft.AspNetCore.Identity.dll
file located in the C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App\6.0.16
directory represents the runtime assembly, which contains the compiled code that is loaded and executed at runtime.
The Microsoft.AspNetCore.Identity.dll
file located in the C:\Program Files\dotnet\packs\Microsoft.AspNetCore.App.Ref\6.0.16\ref\net6.0
directory represents the reference assembly. Reference assemblies provide metadata and serve as a "contract" that defines the available types and members of a particular library. They are used during development and compilation to provide intellisense, type checking, and other features in the IDE.
These paths are specific to your system and may vary depending on your installation and version of ASP.NET Core. The actual locations may be different on another system or with a different version of ASP.NET Core.
When developing an ASP.NET Core application, the necessary assemblies for Microsoft.AspNetCore.Identity are typically resolved automatically by the .NET Core runtime or through the NuGet package manager. You usually don't need to directly reference the assembly files by specifying their paths unless you have specific requirements or customizations.
Reference assemblies and runtime assemblies serve different purposes in the .NET ecosystem.
Reference Assemblies:
- Reference assemblies are used during development and compilation.
- They provide metadata and serve as a "contract" that defines the available types and members of a particular library.
- Reference assemblies do not contain the actual implementation code.
- They are used by IDEs (Integrated Development Environments) to provide intellisense, type checking, and other development features.
- Reference assemblies are typically found in the
ref
directory of the package or SDK installation.
Runtime Assemblies:
- Runtime assemblies contain the actual implementation code that is executed at runtime.
- They are loaded and executed by the .NET runtime environment.
- Runtime assemblies can be specific to a particular platform or framework version.
- They are typically found in the
shared
orruntimes
directory of the package or SDK installation. - Runtime assemblies are required to run the application and provide the functionality defined by the reference assemblies.
In summary, reference assemblies are used during development for compilation and IDE support, while runtime assemblies are used at runtime to execute the code and provide the desired functionality.
作者:Chuck Lu GitHub |
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 全程不用写代码,我用AI程序员写了一个飞机大战
· DeepSeek 开源周回顾「GitHub 热点速览」
· MongoDB 8.0这个新功能碉堡了,比商业数据库还牛
· 记一次.NET内存居高不下排查解决与启示
· 白话解读 Dapr 1.15:你的「微服务管家」又秀新绝活了
2022-07-03 C# Async Tips and Tricks Part 2 : Async Void
2022-07-03 Error `Async test method must have non-void return type` when upgrading from NUnit 2 to NUnit 3
2022-07-03 Are Windows file timestamps timezone aware?
2022-07-03 Navigate To Decompiled Sources Resharper
2022-07-03 How to: View and edit code by using Peek Definition (Alt+F12)
2022-07-03 炉石传说 佣兵战纪 PvE克制
2022-07-03 Redmi红米 设置Sim卡PIN码