.NET Ecosystem and Framework Compatibility

repository·main·Indexed 11 days ago

https://github.com/microsoft/dotnet

Central directory for the .NET ecosystem, featuring detailed application compatibility documentation and breaking changes for .NET Framework versions 4.5 through 4.8.1, covering core areas such as WPF, WinForms, ASP.NET, WCF, CLR, and security protocols.

Tokens
100.6K
Snippets
233
Records
511
Agent score
96%

What's inside .NET

  1. Explore .NET Open Source Libraries

    main

    The .NET ecosystem includes a wide variety of open-source libraries for specialized tasks. This list provides a starting point for finding tools for high-performance code, data manipulation, web development, and more.

    Key Categories and Examples

    • High-Performance & Low-Level:

      • .NEXT: Async-friendly synchronization primitives, metaprogramming, and specialized buffer types.
      • FASTER: High-performance concurrent, latch-free, persistent hash key-value store.
      • Cecil: Read, modify, and write .NET binaries.
      • UUID: High-performance, thread-safe, time-ordered unique identifier generator.
    • Data & Storage:

      • LiteDB: Lightweight NoSQL embedded document database.
      • DeveelDB: SQL-99 embeddable database engine.
      • Parquet.Net: Fully managed implementation of Apache Parquet Format.
      • Cinchoo ETL: ETL framework for parsing/writing CSV, XML, JSON, and more.
    • Web & API Clients:

      • Flurl: Fluent, portable, and testable URL builder and HTTP client.
      • RestSharp: Simple REST and HTTP API client.
      • AngleSharp: HTML5, MathML, SVG, and CSS parser for constructing a DOM.
      • DalSoft.RestClient: Extensible, dynamic, and fluent Rest Client.
    • Utilities & Extensions:

      • JSON.NET: High-performance JSON framework.
      • NodaTime: Improved date and time API for .NET.
      • FluentValidation: Fluent interface and lambda expressions for building validation rules.
      • MoreLINQ: Enhances LINQ to Objects with additional methods.
      • Serilog: Flexible and extensible logging library.
    • Graphics, Audio, & UI:

      • NAudio: Open source audio and MIDI library.
      • DryWetMIDI: Read, write, and process MIDI files.
      • Barcodes: Cross-platform C# library for barcodes and QR codes.
      • GongSolutions.Wpf.DragDrop: Drag-and-drop framework for WPF.
    • Mathematical & Scientific:

      • Math.NET Numerics: Algorithms for numerical computations.
      • DiffSharp: Automatic Differentiation Library.
      • Deveel Math: Computation of astronomic decimals (high-precision numbers).

    Note: Always check the individual repository for the latest maintenance status and compatibility requirements.

  2. Summary of Windows Forms accessibility improvements in .NET 4.7.2

    main

    The following accessibility enhancements were introduced in .NET 4.7.2:

    High Contrast Mode Improvements

    • ToolStripDropDownButton: The drop down arrow now uses OS-defined colors.
    • Buttons, RadioButtons, and CheckBoxes: When FlatStyle is set to Flat or Popup, these controls now use OS-defined colors when selected to ensure readability.
    • GroupBox: Disabled controls within a GroupBox now use OS-defined colors.
    • ToolStrip Controls: ToolStripButton, ToolStripComboBox, and ToolStripDropDownButton have increased luminosity contrast.
    • DataGridViewLinkCell: The LinkColor property now uses OS-defined colors by default.

    Narrator Support

    • ToolStripMenuItem: Narrator now announces ShortcutKeys and indicates when the item is disabled (Enabled = false).
    • ListView: Narrator provides feedback on checkbox states when ListView.CheckBoxes is true.
    • ClickOnce: Improved Scan Mode focus order on download dialogs.

    DataGridView and Keyboard Navigation

    • DataGridView Sorting: Users can sort rows using the F3 key.
    • DataGridView Selection: When SelectionMode is FullRowSelect, the column header changes color to indicate the current column during tabbing.
    • ToolStripButton: Now allows focus when contained within a ToolStripPanel where TabStop is true.

    Visual Cues and PropertyGrid

    • Focus Indicators: RadioButton and CheckBox controls with empty Text properties now display a focus indicator.
    • PropertyGrid: Improved UI Automation support for IsReadOnly and IsEnabled properties based on the element's state.
  3. Explore .NET Open Source Developer Projects

    main

    This repository maintains a community-driven list of .NET open source projects categorized by their utility in the development process. This list is intended for developer projects (tools used to build software), whereas a separate list exists for consumer projects (software built using .NET).

    Key categories include:

    • Implementations: Core frameworks and operating system construction kits.
    • Platforms: Toolkits for concurrency, UI frameworks, and distributed computing.
    • Languages: Implementations of various programming languages (e.g., Python, Ruby, JavaScript) on the .NET runtime.
    • Web Frameworks & CMS: Tools for building web applications, marketplaces, and content management systems.
    • Security: Identity management and security header tools.
    • ADO.NET Providers: Data providers for various databases like PostgreSQL and SQLite.
  4. Understand the .NET Ecosystem Growth Strategy

    main

    The .NET ecosystem is moving toward a model where developers are encouraged to trust and use high-quality libraries that are not controlled by Microsoft. This strategy aims to increase technological diversity and reduce the burden on Microsoft to build every foundational library.

    Key pillars of this strategy include:

    • Improved Library Evaluation: Making it easier for consumers to assess the quality of NuGet packages.
    • Consistent Quality Practices: Establishing defined development processes, including how releases are distributed, how breaking changes are handled, and how security issues are addressed.
    • Transparency and Debuggability: Ensuring package authors make source code and symbols available for debugging and allow for code patching.
    • Co-ownership Models: Moving away from single-maintainer 'hobby' projects toward company-sponsored maintainerships (similar to the Apache Foundation model) to ensure project longevity and prevent maintainer burnout.
  5. Navigate the .NET ecosystem and open source projects

    main

    This repository serves as a central hub for finding information about .NET, .NET Framework, Xamarin, and various open source projects. Use it to locate documentation, release notes, and lists of developer or consumer-facing projects.

    Key resources available in this repository include:

    Note: This repository is not an official support location for .NET or .NET Framework. For product issues, please file them directly in the relevant main project repositories.

  6. Behavioral changes in DeflateStream and GZipStream decompression

    main

    When targeting .NET Framework 4.7.2 or higher, the use of native APIs for decompression in System.IO.Compression.DeflateStream and System.IO.Compression.GZipStream introduces the following potential behavioral differences:

    • Exception Messages: The specific text of exception messages may change, though the exception type remains the same.
    • Memory Handling: Handling of edge cases, such as insufficient memory for operations, may differ.
    • Gzip Header Parsing (GZipStream only):
      • Exceptions for invalid headers may be thrown at different points in the execution.
      • The native implementation strictly enforces the gzip specification for reserved flags (FLG) in the header. Previously, invalid values might have been ignored; now, they may trigger an exception.
  7. Understand the default value of ServicePointManager.SecurityProtocol

    main

    Starting with applications targeting .NET Framework 4.7, the default value of System.Net.ServicePointManager.SecurityProtocol is SecurityProtocolType.SystemDefault.

    This change allows networking APIs based on SslStream (such as FTP, HTTPS, and SMTP) to inherit security protocols directly from the operating system instead of using hard-coded values within the .NET Framework. The actual protocols used will depend on the operating system version and any system-level configurations (SChannel) performed by an administrator.

    For applications targeting versions earlier than .NET Framework 4.7, the default value depends on the specific version of the .NET Framework being targeted.

  8. Ensuring trust in NuGet packages and binaries

    main

    While .NET uses Authenticode signing for binaries and packages, a gap exists between source code and the binaries distributed via NuGet.org. To improve developer trust, the ecosystem aims to address the following:

    • Source-to-Binary Linkage: Ensuring that the source code pointed to in a package actually matches the submitted binaries to prevent compromised toolchain injections.
    • Reproducibility: Providing tools to validate whether a given binary can be reproduced from its source code.
    • Compatibility Visibility: Improving the NuGet gallery and package management UI so consumers can see supported platforms, compatibility, and relevance to their project type before attempting installation.
    • Quality Metrics: Enabling evaluation of packages based on popularity, maintenance, and quality.
  9. Improved WCF chain trust certificate validation for Net.Tcp

    main

    Starting with .NET Framework 4.7.2, WCF certificate authentication with transport security uses improved chain trust validation.

    Requirements for successful validation:

    • Client Certificates: Must be configured for client authentication (containing the appropriate EKU OID).
    • Server Certificates: Must be configured for server authentication (containing the appropriate EKU OID).
    • Root Certificates: The root certificate in the chain must be valid and enabled. If the root certificate is disabled, chain validation will fail.

    This change is enabled by default to improve security. If your certificates do not meet these requirements, authentication will fail.

  10. How FIPS mode affects CryptographicException in .NET

    main

    In .NET Framework 4.8 and later, managed cryptography classes (e.g., SHA256Managed) no longer throw a System.Security.Cryptography.CryptographicException when the system is in FIPS mode.

    Previously (in .NET Framework 4.7.2 and earlier), these classes threw exceptions because the managed implementations were not FIPS 140-2 certified. In .NET 4.8+, these classes instead redirect cryptographic operations to the underlying system cryptography library, ensuring managed and native components follow the same cryptographic policy. This change helps prevent bugs that only appear in production environments where FIPS mode is enabled.

  11. Improving dependency patching and shading in .NET

    main

    The .NET ecosystem identifies a need to improve how package consumers manage and modify dependencies. Currently, the strict identity requirements of NuGet and strong naming make it difficult to patch or experiment with third-party libraries without creating entirely new package IDs, which forces downstream consumers to rebuild their entire dependency graph.

    Proposed improvements include:

    • Package Redirection: Allowing application authors to redirect a specific Package ID and version to a different ID and version (e.g., redirecting a canonical package to a community-maintained fork).
    • Shading (Private Dependencies): Implementing a mechanism similar to Java's 'shading' where a library's dependencies are treated as implementation details. This prevents a library's internal dependencies (like JSON.NET) from constraining the version used by the final application consumer.
    • Source-based Dependencies: Making it easier for developers to convert a NuGet package dependency into a source dependency that they can locally patch and control.
  12. How Icon.ToBitmap handles PNG frames in .NET Framework

    main

    In .NET Framework 4.6 and later, the System.Drawing.Icon.ToBitmap method successfully converts icons containing PNG frames into Bitmap objects.

    In older versions (.NET Framework 4.5.2 and earlier), attempting to use ToBitmap on an icon with PNG frames throws a System.ArgumentOutOfRangeException.

    Note for Migrating Apps: If your application targets .NET Framework 4.6+ and contains specific exception handling logic for System.ArgumentOutOfRangeException during icon conversion, that handler will no longer be triggered because the conversion now succeeds.

    // In .NET 4.6+, this no longer throws ArgumentOutOfRangeException for PNG frames
    System.Drawing.Bitmap bmp = myIcon.ToBitmap();