.NET Runtime
repository·main·Indexed 12 days ago
https://github.com/dotnet/runtimeThe foundation for building and running applications across all supported platforms, containing the source code for the .NET runtime, class libraries, and the shared host (dotnet muxer). Includes technical documentation on CoreCLR design, garbage collection, the type system, and the IL trimmer (illink), as well as guidelines for coding, API stability, and performance.
What's inside .NET
- System.Runtime is a core library containing fundamental classes and base classes. It defines commonly-used value and reference data types, events and event handlers, interfaces, attributes, and exception processing mechanisms.
Overview of System.Drawing.Primitives
mainThe
System.Drawing.Primitivesassembly provides fundamental drawing APIs that do not require access to native GDI+ libraries. It is designed to be cross-platform, supporting all officially supported .NET platforms (not just Windows).Key types provided by this assembly include:
PointSize
Overview of System.IO.Compression
mainTheSystem.IO.Compressionassembly provides types for various compression tasks, including zip manipulation and implementations of the Deflate, Gzip, and Zstandard algorithms. For detailed API documentation, refer to the official Microsoft Learn documentation.Overview of CoreCLR
mainCoreCLR is the .NET runtime implementation used by most .NET workloads. This directory contains the source code for the runtime itself. For testing purposes, CoreCLR tests are located in thesrc/testssubtree of the repository.Overview of Mono in .NET Runtime
mainMono is the .NET runtime implementation used for specific workloads, including:
- Mobile: iOS and Android
- Browser: WebAssembly (WASM)
- WASI: WebAssembly System Interface
Overview of the dotnet-pgo tool
mainThe
dotnet-pgotool is an experimental utility used to post-process application trace data (collected viadotnet traceorperfview) into profile data files. These files are used for two primary purposes:- Producing
.jittracefiles: These allow you to time-shift JIT compilation from later in the application process to earlier in the process. - Producing
.mibcfiles: These serve as input for thecrossgen2tool to assist in Ahead-of-Time (AOT) compilation.
Requirement: The tool requires
MethodDetailsevents. These are natively produced by the .NET 5.0 runtime or can be obtained by modifying the .NET Core 3 runtime to produce them.- Producing
Overview of Microsoft.Extensions.Logging.Abstractions
mainThe
Microsoft.Extensions.Logging.Abstractionspackage provides the core interfaces and types for logging in .NET. It defines the contracts that logging implementations must follow. While this package contains the abstractions, the actual logging logic is provided by implementations found inMicrosoft.Extensions.Loggingor other third-party logging providers.Key types you will interact with include:
ILogger: The primary interface for logging messages.ILoggerFactory: Used to createILoggerinstances.ILogger<TCategoryName>: A generic version ofILoggerthat automatically categorizes logs by the type name.LogLevel: An enumeration defining the severity of the log message.LoggerMessage: Used for high-performance logging.NullLogger: A no-op implementation used when no logging is desired.
Overview of Microsoft.Extensions.Diagnostics.Abstractions
mainThe
Microsoft.Extensions.Diagnostics.Abstractionspackage provides the core interfaces and abstractions for diagnostics in .NET. These abstractions allow developers to define diagnostic instrumentation that can be implemented by concrete classes inMicrosoft.Extensions.Diagnosticsor other specialized diagnostics packages.Key features include support for metrics instrumentation, allowing you to define how measurements are captured and listened to within an application.
Overview of System.Security.Cryptography capabilities
mainThe
System.Security.Cryptographyassembly provides the core cryptographic support for .NET. It includes implementations and wrappers for various cryptographic primitives and protocols, such as:- Hashing: e.g.,
SHA256 - Symmetric-key message authentication: e.g.,
HMACSHA256 - Symmetric-key encryption: e.g.,
Aes - Symmetric-key authenticated encryption: e.g.,
AesGcm - Asymmetric (public/private key) cryptography: e.g.,
RSA,ECDsa, orECDiffieHellman - X.509 public-key certificates: e.g.,
X509Certificate2
Detailed API documentation is available at the official Microsoft Learn sites for System.Security.Cryptography and X509Certificates.
- Hashing: e.g.,
Overview of System.Security.Cryptography.Pkcs
mainThe
System.Security.Cryptography.Pkcsassembly provides support for non-primitive cryptographic operations using ASN.1 BER/CER/DER encoded values. It implements various standards from the Public Key Cryptography Standards (PKCS) specification set, as well as IETF RFC 3161 timestamp tokens.Key capabilities include:
- Cryptographic Message Syntax (CMS/PKCS#7): Using
SignedCmsandEnvelopedCms. - Private Key Information Syntax (PKCS#8): Using
Pkcs8PrivateKeyInfo. - Personal Information Exchange (PFX/PKCS#12): Using
Pkcs12InfoandPkcs12Builder. - Object Attributes (PKCS#9): Using types derived from
Pkcs9AttributeObject. - Timestamping: Using
Rfc3161TimestampToken(RFC 3161).
Note that basic cryptographic primitives (like PKCS#1 RSA) and certificate request formats (PKCS#10) are located in the
System.Security.CryptographyandSystem.Security.Cryptography.X509Certificatesassemblies respectively.- Cryptographic Message Syntax (CMS/PKCS#7): Using
Overview of System.Security.Principal.Windows
mainTheSystem.Security.Principal.Windowsassembly provides implementation support forSystem.Security.Principal.IIdentityandSystem.Security.Principal.IPrincipalinterfaces specifically for Microsoft Windows accounts. It allows developers to work with Windows-specific security identities and principals within .NET applications.What is cDAC (Data Contract Reader)?
maincDAC is a managed implementation of the diagnostic data access layer. It allows diagnostic tools to inspect the state of a .NET runtime process by reading memory through well-defined data contracts. This approach removes the requirement for version-matched native DAC/DBI libraries, as it relies on managed contract interfaces rather than native binary compatibility.