dotnet-library-api-compat

Guide .NET library API changes for binary and source compatibility.

1|Updated Feb 22, 2026
One-click install
npx skills add https://github.com/rudironsoni/dotnet-agent-harness --skill dotnet-library-api-compat-rudironsoni
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: dotnet-library-api-compat
Source: https://github.com/rudironsoni/dotnet-agent-harness/tree/main/.rulesync/skills/dotnet-library-api-compat
Command: npx skills add https://github.com/rudironsoni/dotnet-agent-harness --skill dotnet-library-api-compat-rudironsoni

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill helps .NET library authors understand and maintain binary and source compatibility, preventing breaking changes for consumers and ensuring smooth versioning.

Core Features & Use Cases

  • Compatibility Rules: Details safe vs. breaking changes at both binary and source levels.
  • Type Forwarders: Explains how to move types between assemblies without breaking consumers.
  • SemVer Mapping: Guides how API changes map to Semantic Versioning increments.
  • Use Case: You've refactored your library, moving core types to a new assembly. This Skill shows you how to implement type forwarders so existing users don't encounter TypeLoadException after updating.

Quick Start

Use the dotnet-library-api-compat skill to understand how adding a new public method to a non-sealed class affects binary compatibility.

Frequently Asked Questions about dotnet-library-api-compat

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I maintain binary and source compatibility when modifying a .NET library API?

To maintain .NET library compatibility, you must distinguish between safe and breaking API changes at both binary and source levels, ensuring consumers can update without compilation errors or runtime exceptions like TypeLoadException.

How do I move types between assemblies without breaking existing .NET library consumers?

You can move types between assemblies without breaking .NET library consumers by using type forwarders, which redirect the runtime to the new assembly location and prevent TypeLoadException during assembly reorganization.

How do API changes map to Semantic Versioning increments in .NET libraries?

API changes map to Semantic Versioning increments by assigning major version bumps for breaking changes, minor bumps for new backward-compatible functionality, and patch bumps for backward-compatible bug fixes in .NET libraries.

Does adding a new public method to a non-sealed class break binary compatibility in .NET?

Adding a new public method to a non-sealed class can affect binary compatibility in .NET if derived classes exist, as it changes the virtual method table layout and may cause runtime binding failures in un-recompiled consumers.

What is the best way to manage the deprecation lifecycle of APIs in .NET 8.0 SDK-style projects?

The best way to manage API deprecation in .NET 8.0 SDK-style projects is by applying the [Obsolete] attribute, which allows you to communicate upcoming breaking changes and map the lifecycle to Semantic Versioning increments.

Do I need type forwarders when refactoring core types into a new assembly in .NET?

You need type forwarders when refactoring core types into a new .NET assembly to ensure existing users do not encounter TypeLoadException, maintaining binary compatibility without forcing consumers to recompile against the new structure.