dotnet-library-api-compat

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

71|10|Updated Feb 11, 2026
One-click install
npx skills add https://github.com/wshaddix/dotnet-skills --skill dotnet-library-api-compat-wshaddix
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: dotnet-library-api-compat
Source: https://github.com/wshaddix/dotnet-skills/tree/main/skills/dotnet-library-api-compat
Command: npx skills add https://github.com/wshaddix/dotnet-skills --skill dotnet-library-api-compat-wshaddix

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill helps .NET library authors maintain compatibility with their consumers, preventing runtime errors and compilation issues when making changes to their APIs.

Core Features & Use Cases

  • Binary Compatibility Analysis: Understand which API changes break existing compiled code.
  • Source Compatibility Analysis: Identify changes that will cause consumer code to fail compilation.
  • Type Forwarding: Learn how to safely move types between assemblies without breaking consumers.
  • SemVer Guidance: Map API changes to Semantic Versioning increments (Major, Minor, Patch).
  • Use Case: You've refactored your library, moving several classes to a new assembly. This Skill guides you on using type forwarders to ensure existing users can upgrade without recompiling their applications.

Quick Start

Explain the impact of removing a public method from a .NET library on 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 does removing a public method affect .NET binary compatibility?

Removing a public method breaks .NET binary compatibility because compiled consumer code expects the method's metadata to exist, causing runtime MissingMethodException errors. Source compatibility is also impacted, as dependent applications will fail to compile against the updated library.

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

You can move types between .NET assemblies without breaking consumers by using type forwarders. This technique redirects type resolution at runtime, allowing existing compiled code to function without recompilation when reorganizing library architectures.

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

Map .NET API changes to Semantic Versioning by incrementing the Major version for breaking changes, Minor for backward-compatible additions, and Patch for bug fixes. This ensures consumers can accurately gauge the upgrade risk based on the version number.

What is the best way to verify .NET API compatibility during library development?

The best way to verify .NET API compatibility is by using the `EnablePackageValidation` property. This built-in mechanism checks for breaking changes during the build process, ensuring source and binary compatibility are maintained across releases.

Do default interface members maintain binary compatibility in .NET libraries?

Default interface members provide a way to add methods to interfaces without breaking binary compatibility. They allow existing implementations to continue functioning while providing default behavior for new API additions in .NET libraries.