Skip to main content
Any Framework

MSBuild tasks and targets to perform api compatibility checks on assemblies and packages.

Published
Jul 14, 2026
3mo ago
Total Downloads
421.3K
421,286

Install

dotnet add package Microsoft.DotNet.ApiCompat.Task --version 11.0.100-preview.6.26359.118

No framework information available.

README

Microsoft.DotNet.ApiCompat.Task

MSBuild tasks and targets to perform API compatibility checks on assemblies and packages.

Getting started

Add a PackageReference to this package and the EnablePackageValidation and ApiCompatValidateAssemblies features become available on your project. See the package validation docs for the full list of options.

<PackageReference Include="Microsoft.DotNet.ApiCompat.Task" Version="..." PrivateAssets="all" />

Requirements

This package ships only a .NET (Core) implementation of the MSBuild task. When the task is invoked from desktop MSBuild.exe (i.e. inside Visual Studio), the task is loaded into a .NET task host using MSBuild's Runtime="NET" support.

That support requires:

  • MSBuild 18.0 or later (Visual Studio 2026 / MSBuild.exe 18.0+).
  • Equivalently, .NET SDK 10.0.100 or later.

If the package is consumed under an older MSBuild / SDK, the task will fail to load with MSB4175 ("The task factory ... could not be loaded") or with a NETHostTaskLoad_Failed error from the .NET task host. Upgrade Visual Studio or the .NET SDK to a supported version to resolve.

Changes from Previous Version

No structural changes between v11.0.100-preview.5.26302.115 and v11.0.100-preview.6.26359.118.

Adoption Assessment

A verified publisher signal is available. Assess fit from the package's supported frameworks, license and dependency graph rather than popularity alone.

This version is marked prerelease. Validate its API and upgrade path before production use.No target framework metadata is available. Confirm compatibility in a representative project before standardising on this package.

Related Guides & Workflows

Learn how to evaluate, integrate, or audit this package in your .NET project.