.NET

Dated Jul 6, 2025; last modified on Fri, 11 Jul 2025

My current role is on a .NET project. Get good at navigating this ecosystem. Using Advent of Code 2024 in C# as the playground.

C# Language Reference

  • Language Version
  • Types:
    • Built-in Types; Value Types (integral; floating-point; bool; char; enumeration; struct; ref struct; tuple; nullable value); Reference Types (Built-in reference types; record; class; interface; nullable reference types; collections; arrays); Void; Unmanaged Types; Default Values.
  • Keywords
    • Modifiers; Statement; Method Parameters; Namespace; Generic Type Constraint; Access; Literal; Contextual; Query.
  • Operators and Expressions
    • Arithmetic; Boolean Logical; Bitwise and Shift; Collection; Equality; Comparison; Member Access; Type-Testing; User-Defined Conversion; Pointer-Related; Assignment; Lambda; Patterns; + and +=; - and -=; ?:; ! (null-forgiving); ?? and ??=; =>; ::; await; default; delegate; is; nameof; new; sizeof; stackalloc; switch; true and false; with; Deconstruction; Operator Overloading.
  • Statements
    • Declaration; Exception-Handling; Iteration; Selection; Jump; checked and unchecked; fixed; lock; using; yield.
  • Special Characters
    • Comments; Discard; $ String Interpolation; @ Verbatim Identifier; """ Raw String Literal.
  • Attributes Read by the Compiler
    • Global Attributes; Caller Information; Nullable Static Analysis; Miscellaneous; Pseudo-Attributes
  • Unsafe Code and Pointers
  • Preprocessor Directives
  • Compiler Options
    • Language; Output; Input; Error and Warning; Code Generation; Security; Resources; Miscellaneous; Advanced.
  • XML Documentation Comments
    • Generate API Documentation; Recommended Tags

.NET Tools and Diagnostics

  • .NET Software Development Kit (SDK)
    • Environment variables; dotnet-install Scripts; global.json; Telemetry; Signed-Package Verification; Artifacts Output Layout; Error Messages.
  • .NET Command Line Interface (CLI)
    • dotnet Command; Elevated Access; Tab Completion; Library Development; Create Templates.
  • Integrated Development Environment (IDE)
    • Visual Studio; Visual Studio Code.
  • MSBuild and Project Files
    • Project SDKs; Target Frameworks; Dependency Management.
  • Global and Local Tools
    • Manage Tools; Troubleshoot Tools; Create CLI Tools.
  • Additional Tools
    • Uninstall; Install; Self-Signed Certificates; WCF Web Service Reference Provider; WCF Service Utility; WCF Service XML Serializer; XML Serializer Generator.
  • Diagnostics and Instrumentation
    • Managed Debuggers; Logging & Tracing; ILogger; Observability with OpenTelemetry; Resource Monitoring; App Health Checks; Metrics; Distributed Tracing; Specialized Diagnostics; .NET CLI Global Tools; Unmanaged API.
  • ✅ Code Analysis
  • SYSLIB Diagnostics:
    • Obsoletions; Experimental Features; Source-Generated Code.

.NET Fundamentals

  • Fundamental Coding Components
    • Base Types
      • Common Type System; Language Independence; Type Conversion; Anonymous Types vs. Tuple Types; Class Library; System.Object; Nullable.
    • Generic Types
      • Collections; Delegates; Math; Interfaces; Covariance and Contra-variance.
    • Collections and Data Structures
      • Selection; Commonly Used Types; Selecting Generic Collections; Comparisons and Sorts; Sorted Collection Types; Hashtable and Dictionary Types; Thread-safe Collections.
    • Delegates and Lambdas
    • Enumerations: Enum and FlagAttribute
    • Events
      • Raise and Consume Events; Handle Multiple Events; Observer Design Pattern.
    • Exceptions
      • try-catch Block; Catching Specific Exceptions; Explicitly Throwing; User-Defined Exceptions (with Localized Messages); finally Blocks; User-Filtered Exception Handlers; COM Interop Exceptions; Best Practices.
    • Numeric Types
      • Boolean; Byte; Decimal; Double; Int32; Int64; BigInteger; Complex; Single.
    • Dates, Times, and Time Zones
      • Choosing Between Types; Work With Calendars; DateOnly and TimeOnly; Arithmetic Operations; TimeProvider for Predictability; Support in System.Text.Json; Time Zones; DateTime; TimeSpan.
    • Attributes
      • Applying Attributes; Custom Attributes; Retrieve Information Stored in Attributes.
    • Performance-Related Types
      • Memory<T>; Span<T>; SIMD-Enabled Types; Value Tuples.
  • Runtime Libraries
    • Format Numbers, Dates, and Other Types
      • Numeric Format Strings; Date and Time Format Strings; TimeSpan Format Strings; Enumeration Format Strings.
    • Work with Strings
      • Character Encoding; Comparing; Displaying and Persisting Formatted Data; Basic String Operations; Parse (Convert) Strings; String; Char; StringComparer; Encoding; Regex; Rune; StringBuilder.
    • Regular Expressions
      • Language Reference (Escapes; Character Classes; Anchors; Grouping; Quantifiers; Backreference; Alternation; Substitutions; Options; Miscellaneous Constructs); Object Model; Backtracking; Compilation and Reuse; Source Generation; Best Practices.
    • Serialization
      • JSON; XML and SOAP; Binary; DataContractAttribute; DataContractSerializer IExtensibleDataObject; XsdDataContractExporter.
    • System.CommandLine
      • Syntax; Define Commands; Model Binding; Tab Completion; Dependency Injection; Customize Help; Handle Termination; Use Middleware.
    • File and Stream I/O
      • File Path Formats; Common I/O Tasks; Async File I/O; I/O Errors; Isolated Storage; Pipes; Pipelines; Work with Buffers; Memory-Mapped Files; FileStream; FileSystemWatcher.
    • System.AppContext
    • System.Console
    • System.Random
    • Artificial Intelligence
      • IChatClient (and Middleware); Chat Completion; Tool Calling; Caching Responses; Telemetry; ChatOptions; Functionality Pipeline; Dependency Injection; IEmbeddingGenerator (and Middleware).
    • Dependency Injection
    • Configuration
      • Providers; Source Generation; Custom Providers; Options Pattern; Options Validation Source Generation; Options Pattern Guidance for Library Authors.
    • Logging
      • Providers; Source Generation; Guidance for Library Authors; Custom Providers; High Performance Logging; Console Log Formatting.
    • HostBuilder (Generic Host)
    • Resilience
    • Networking
      • Availability; IPv6; Service Discovery; HTTP; Sockets; WebSockets; Security; QUIC; Telemetry.
    • File Globbing
    • Primitives Library
    • Globalization and Localization
      • ICU; Culture-Insensitive String Operations; Best Practices; Localizability Review; CompareInfo, CompareOptions; CultureAndRegionInfoBuilder; CultureInfo; DateTimeFormatInfo; NumberFormatInfo; PersianCalendar; RegionInfo; SortKey; SortVersion.
    • Resources in .NET Apps
      • .resx Files; Satellite Assemblies; Package and Deploy Resources; Retrieve Resources.
    • Worker Services
      • Queue Service; Scoped Services within a BackgroundService (for scoped services, window services); IHostedService; Deploying a Worker Service.
    • Caching
    • System.Threading.Channels
    • Math Operations: System.MidpointRounding
    • Win32.Registry
    • Uri
    • Reflection: System.Type
    • Graphics: System.Drawing.Drawing2D.Matrix
    • InternalsVisibleToAttribute
    • RuntimeHelpers
    • System.Runtime.Versioning.Component GuaranteesAttribute
    • AssemblyLoadContext
    • ProcessStartInfo
    • Environment
  • Execution Model
    • Common Language Runtime (CLR)
    • Managed Execution Process
    • Assemblies
      • Contents; Manifest; Security Considerations; Versioning; Side-by-Side Execution; File Format; Unload-ability; Reference Assemblies; Resolve Assembly Loads; Create Assemblies; Assembly Names; Fully Qualified Name; Location; Attributes; Strong-named Assemblies; Delay-Signing; Viewing Contents; Type Forwarding in the CLR; Friend Assemblies; Detecting Assemblies; Loading and Unloading; Embedded Types; Inspection using MetadataLoadContext.
    • Reflection
      • View Type Information; Generic Types; Dynamically Load and Use Types; Access Custom Attributes; Fully Qualified Type Names; Emit Dynamic Methods and Assemblies; Metadata and Self-Describing Components.
    • Dependency Loading
      • AssemblyLoadContext; Default Dependency Probing; Managed Assemblies; Satellite Assemblies; Unmanaged Libraries; Collect detailed Assembly Loading Information.
    • Versioning
    • Configure .NET Runtime Settings
      • Compilation; Debugging & Profiling; Garbage Collector; Globalization; Networking; Threading; Windows Presentation Framework (WPF).
    • Troubleshoot App Launch Failures

ASP.NET Core

  • Fundamentals
    • App Startup; Dependency Injection; Native Ahead of Time (AOT); Middleware (Rate Limiting; Minimal; Testing; Response Caching; Write; Request and Response Operations; Request Decompression; Factory-Based Middleware); Host (WebApplication; Generic Host; Web Host); Configuration; Options; Environments; Logging and Monitoring (HTTP; W3C; Health Checks; Built-in Metrics); HttpContext; Routing; Handle Errors; Make HTTP Requests; Map Static Files; Static Files; dotnet-scaffold Telemetry.
  • Web Apps
    • Razor Pages (Filters; Conventions); MVC (Views; Partial Views; Controllers; Routing; Dependency Injection; Unit Test); Blazor (Supported Platforms; Tooling; Web Assembly Tooling and AOT; Hosting Models; Blazor Hybrid; Fundamentals; Components; Globalization and Localization; Forms; File Uploads and Downloads; JavaScript Interop; Call a Web API; Images and Documents; Security and Identity; State Management; Debug; Lazy Load Assemblies; WebAssembly Native Dependencies; Performance; Test Components; Progressive Web Applications; Host and Deploy; EF Core; Advanced Scenarios); Client-Side Development (Single Page Apps; LibMan; WebAssembly JS Interop; Grunt; Bundle and Minify; Browser Link); Session and State Management; Layout; Razor Syntax; Razor Class Libraries; Tag Helpers; Advanced.
  • APIs
    • Controller-Based APIs (Action Return Types; JSON Patch Requests; Format Response Data; Custom Formatters; Analyzers; Conventions; Handle Errors; Test with HttpRepl); Minimal APIs (WebApplication; Route Handlers; Parameter Binding; Create Responses; Filters; Unit and Integration Tests; Middleware; Handle Errors; Authentication and Authorization); OpenAPI (Documents; Metadata; Tools).
  • Real-Time Apps
    • Supported Platforms; Server Concepts (Hubs; Send from Outside a Hub; Users and Groups; API Design Considerations; Hub Filters); Clients (.NET; Java, JavaScript); Host and Scale (Azure App Service; Redis Backplane; SignalR with Background Services); Configuration; IHttpContextAccessor and HttpContext; Authentication and Authorization; Security Considerations; MessagePack Hub Protocol; Streaming; Compare SignalR and SignalR Core; WebSockets; Logging and Diagnostics; Troubleshooting; Hub Protocol; Transport Protocols.
  • Remote Procedure Call Apps
    • gRPC Services with C#; Call gRPC Services with C#; gRPC Services with ASP.NET Core; gRPC in Browser Apps; Configuration; Authentication and Authorization; Error Handling; gRPC Interceptors; Logging and Diagnostics; Security Considerations; Performance Best Practices; Native AOT; Inter-Process Communication (Unix Domain Sockets; Named Pipes); Code-first Services and Clients; gRPC Health Checks; Managing Protobuf References; Testing with gRPCurl and gRPCui; Migrating from C-core; Why Migrate WCF to ASP.NET Core; Compare gRPC Services with HTTP APIs.
  • Best Practices
  • Servers
    • HHTP.sys; Kestrel (Overview; Endpoints; Options; Diagnostics; HTTP/2; HTTP/3; Connection Middleware; Reverse Proxy; Host Filtering; Request Draining); Internet Information Services (IIS) (ASP.NET Core Module; In-Process and Out-of-Process Hosting; Hosting Bundle; web.config File; Visual Studio Support; IIS Modules; Logging and Diagnostics; Troubleshoot; Advanced Config; Transform web.config; HTTP/2; HTTP/3); YARP (Configuration; Proxy Features; Protocols ad Guidance; Extensibility; Deployment Options; Troubleshooting).
  • Test
    • .NET Hot Reload; Visual Studio Dev Tunnels; Visual Studio .http Files; HttpRepl; Minimal API; Blazor; Razor Pages; MVC Controllers; Integration; Load and Stress Testing; Test Middleware.
  • Debug
    • Visual Studio; Remote Debugging; Snapshot Debugging in Azure; Snapshot Debugging in Visual Studio; Visual Studio Dev Tunnels.
  • Troubleshoot
    • Troubleshoot and Debug; Azure and IIS.
  • Code Analysis
  • Data Access
    • dotnet scaffold in a Razor Pages Project; Entity Framework (EF) 6; Azure SQL Database with a Managed Identity; Azure Storage w/ Visual Studio.
  • Host and Deploy
    • Azure App Service; DevOps; Windows Service; Linux with Nginx; Docker; Proxy and Load Balancer; Scaling Apps on Azure; Web Farm; Visual Studio Publish Profiles; Directory Structure.
  • Security and Identity
    • Authentication; Authorization; Data Protection; Secrets Management; Enforce HTTPS; Docker with HTTPS; EU General Data Protection Regulations; Cross-Site Request Forgery; Open Redirect Attacks; Cross-Site Scripting; Enable Cross-Origin Requests; Share Cookies Among Apps; SameSite Cookies; IP Safe List; Application Security - OWASP.
  • Performance
    • Caching; Rate Limiting Middleware; Timeouts Middleware; Memory and GC; Scaling Apps on Azure; Object Reuse with ObjectPool; Response Compression; Diagnostic Tools; Load and Stress testing; Event Counters.
  • Globalization and Localization
    • Localizable Content; Provide Resources; Select Language/Culture; Portable Object Localization; Extensibility; Troubleshoot.
  • Advanced
    • Model Binding; Model Validation; Compatibility Version; Write Middleware; Request and Response Operations; Request Decompression; URL Rewriting; File Providers; Request-Feature Interfaces; Access HttpContext; Change Tokens; Open Web Interface for .NET; Background Tasks with Hosted Services; Hosting Startup Assemblies; ASP.NET Core in Class Libraries; Microsoft.AspNetCore.App; Microsoft.AspNetCore.All; High Performance Logging; Using a File Watcher; Factory-Based Middleware.

.NET Aspire

  • App Host (Orchestration)
    • Orchestrate Node.js and Python apps; Configuration; Dockerfiles; Networking; Eventing; External Params; Persistence Using Volumes.
  • Dashboard
    • Standalone Mode; Configuration; Browser Telemetry; Security.
  • Testing
    • Managing the App Host; Accessing Resources in Tests
  • Fundamentals
    • Service Discovery; Service Defaults; Launch Profiles; Health Checks; Telemetry.
  • Integrations
    • Apache Kafka; Azure; Dapr; Elasticsearch; Entity Framework Core; Keycloak; Milvus; MongoDB; MySQL; NATS; Orleans; PostgreSQL; Qdrant; RabbitMQ Service Broker; Redis; Seq; SQL Server; Community Toolkit.
  • Custom Integrations
    • Hosting Integrations; Client Integrations; Secure Communication
  • Deployment
    • Azure Container Apps; Application Insights; With a SQL Server Database; With Redis; Tool-Builder Manifest Schemas.
  • Troubleshooting
    • Allow Insecure Transport; Untrusted Localhost Certificate; Installation; Specified Name Already in Use; Unhealthy Container Runtime; Missing Connection String; Discord & StackOverflow.