.NET Conceptual Documentation

repository·main·Indexed 26 days ago

https://github.com/dotnet/docs

Central hub for conceptual documentation of the .NET ecosystem. This repository contains guides and samples for .NET workloads, including C# language features, MCP server development and publishing, native hosting using nethost and hostfxr, plugin architectures with AssemblyDependencyResolver, and Orleans Transport Layer Security.

Tokens
225.6K
Snippets
452
Records
1.1K
Agent score
89%

What's inside dotnet-docs

  1. Overview of the External RuleSet Toolkit

    main

    The External RuleSet Toolkit allows you to manage and edit Windows Workflow Foundation (WF) RuleSets in a database rather than embedding them directly in your workflow assembly. This enables updating business rules at runtime without rebuilding or redeploying the workflow application.

    Key Components:

    • RuleSet Tool: A Windows Forms-based GUI for managing, editing, and versioning RuleSets in a database.
    • RuleSet Service: A host service configured on your application that retrieves RuleSets from the database.
    • ExternalPolicy Activity: A workflow activity that requests a specific RuleSet from the service and executes it against the workflow.

    Prerequisites:

  2. Overview of Azure Cosmos DB

    main

    Azure Cosmos DB is a fully managed NoSQL database service designed for fast, predictable performance and global distribution.

    • Data Format: All resources are stored as JSON documents.
    • Querying: Supports a subset of ANSI SQL grammar, allowing you to use familiar SQL syntax to query JSON data.
    • Core Concepts:
      • Items: Individual documents containing metadata.
      • Feeds: Collections of items.
  3. Overview of Authentication and Authorization in .NET MAUI

    main

    In .NET MAUI applications, security is handled through two distinct processes:

    1. Authentication: The process of obtaining and validating identification credentials (e.g., username and password) against an authority to establish an identity.
    2. Authorization: The process of determining whether an established identity has permission to access specific resources.

    Common integration approaches for .NET MAUI apps communicating with ASP.NET web applications include:

    • Using ASP.NET Core Identity.
    • Using external authentication providers (e.g., Microsoft, Google, Facebook, or Twitter).
    • Using authentication middleware.

    In complex architectures (like the eShop reference application), a containerized identity microservice using IdentityServer can be used to issue bearer tokens. In such setups, ASP.NET Core Identity is often used to manage the actual user database and user interface for the authentication process.

  4. Overview of POS for .NET v1.14.1

    main

    Microsoft Point of Service for .NET (POS for .NET) v1.14.1 is a class library designed for POS developers to interact with hardware using .NET technologies.

    Key capabilities include:

    • A consistent interface for .NET Framework applications to interact with POS devices.
    • Interfaces and classes for common devices like Cash Drawers and Line Displays.
    • A fully compliant implementation of the Unified Point of Service (UnifiedPOS) v1.14 international standard.
    • Support for Windows Plug and Play functionality.

    Important Compatibility Note: POS for .NET does not provide support for the Windows Runtime (WinRT) API. For WinRT-based POS device support, use the Windows.Devices.PointOfService namespace.

  5. Overview of securing .NET Microservices and Web Applications

    main

    This guide covers the fundamental security pillars for .NET microservices and web applications, specifically focusing on:

    • Authentication: Verifying the identity of users or services.
    • Authorization: Determining what authenticated users or services are allowed to do.
    • Application Secrets: Managing sensitive information like API keys, connection strings, and certificates securely.
  6. Overview of dotnet-trace commands and capabilities

    main

    The dotnet-trace tool is a cross-platform utility built on the .NET EventPipe that allows you to collect traces of a running process without requiring a native profiler.

    Available Commands

    • collect: Offers consistent functionality across any supported OS.
    • collect-linux: Uses Linux-specific OS capabilities (requires kernel version >= 6.4 and root privileges) to provide advanced features like tracing all processes simultaneously and capturing native library/kernel events.
    • convert: Converts trace files.
    • ps: Lists processes.
    • list-profiles: Lists available profiles.
    • report: Generates reports from traces.
  7. Overview of .NET 6 Features

    main

    .NET 6 is a Long-Term Support (LTS) release that unifies the SDK, base libraries, and runtime across mobile, desktop, IoT, and cloud apps. Key improvements include:

    • Performance: Rewritten FileStream for better Windows performance, introduction of Crossgen2 for AOT compilation, and Dynamic PGO.
    • Platform Support: Native Arm64 support for macOS (Apple Silicon) and Windows Arm64.
    • Productivity: Hot reload support and modernized C# 10 project templates.
    • Language Updates: C# 10 (global using, file-scoped namespaces, record structs), F# 6, and Visual Basic improvements.
  8. Overview of GitHub Copilot modernization

    main

    GitHub Copilot modernization is an agent available in Visual Studio, Visual Studio Code, GitHub Copilot CLI, and GitHub.com. It automates the process of upgrading .NET projects to newer versions and migrating .NET applications to Azure.

    Key Capabilities:

    • Upgrade to newer .NET versions (e.g., .NET 8, 9, 10).
    • Convert legacy project formats to SDK-style.
    • Replace libraries (e.g., Newtonsoft.Json to System.Text.Json, System.Data.SqlClient to Microsoft.Data.SqlClient).
    • Migrate technologies to Azure (e.g., Azure Functions in-process to isolated worker, WebForms to Blazor).
    • Add Aspire support.
    • Assess code, configuration, and dependencies for cloud readiness.
  9. Overview of .NET components

    main

    The .NET platform consists of several core layers that enable application development:

    • Runtime: Executes the application code and manages resources.
    • Libraries: Provide essential utility functionality (e.g., JSON parsing via System.Text.Json).
    • Compiler: Translates source code (primarily C#) into executable runtime code.
    • SDK and Tools: Provides the environment for building, testing, and monitoring apps (e.g., the dotnet CLI).
    • App Stacks: High-level frameworks for specific app types, such as ASP.NET Core for web applications or Windows Forms for desktop applications.
    • NuGet: The package manager used to consume hundreds of thousands of third-party libraries.
  10. Understand the .NET disk layout

    main

    When .NET is installed, it uses a specific directory structure where a single version-agnostic {dotnet_root} serves as a shared root for multiple major and minor versions. While the host is a single executable, most components (runtimes, SDKs, frameworks) reside in versioned subdirectories, allowing multiple versions to coexist side-by-side.

    Key components include:

    • {dotnet_root}: The shared root (e.g., dotnet).
    • dotnet: The native host (muxer) used to launch runtimes or SDKs.
    • dnx: A shell script for one-shot execution of .NET tools (similar to npx).
    • host/fxr/<version>: Contains framework resolution logic.
    • sdk/<version>: The managed tooling (CLI, MSBuild, compilers, etc.).
    • shared/: Contains versioned shared frameworks like Microsoft.NETCore.App, Microsoft.AspNetCore.App, and Microsoft.WindowsDesktop.App (Windows only).
    • packs/: Contains reference assemblies (.Ref) for compilation and runtime packs for building self-contained applications.
    • library-packs/: Contains NuGet package files used as a NuGet source by the SDK.
    • templates/: Contains project templates used by dotnet new.
    {dotnet_root}
    ├── dotnet
    ├── dnx
    ├── LICENSE.txt
    ├── ThirdPartyNotices.txt
    ├── host
    │   └── fxr
    │       └── <fxr version>
    ├── sdk
    │   └── <sdk version>
    ├── sdk-manifests
    │   └── <sdk feature band version>
    ├── library-packs
    ├── metadata
    │   └── workloads
    │       └── <sdk feature band version>
    ├── template-packs
    ├── packs
    │   ├── Microsoft.AspNetCore.App.Ref
    │   ├── Microsoft.NETCore.App.Ref
    │   ├── Microsoft.NETCore.App.Host.<rid>
    │   ├── Microsoft.WindowsDesktop.App.Ref
    │   ├── NETStandard.Library.Ref
    │   ├── Microsoft.NETCore.App.Runtime.<rid>
    │   ├── Microsoft.AspNetCore.App.Runtime.<rid>
    │   ├── runtime.<rid>.Microsoft.DotNet.ILCompiler
    │   └── Microsoft.NETCore.App.Runtime.NativeAOT.<rid>
    ├── shared
    │   ├── Microsoft.NETCore.App
    │   ├── Microsoft.AspNetCore.App
    │   ├── Microsoft.AspNetCore.All
    │   └── Microsoft.WindowsDesktop.App
    └── templates
        └── <templates version>