Mono.ApiTools.MSBuildTasks 0.6.0

dotnet add package Mono.ApiTools.MSBuildTasks --version 0.6.0
                    
NuGet\Install-Package Mono.ApiTools.MSBuildTasks -Version 0.6.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Mono.ApiTools.MSBuildTasks" Version="0.6.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Mono.ApiTools.MSBuildTasks" Version="0.6.0" />
                    
Directory.Packages.props
<PackageReference Include="Mono.ApiTools.MSBuildTasks" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Mono.ApiTools.MSBuildTasks --version 0.6.0
                    
#r "nuget: Mono.ApiTools.MSBuildTasks, 0.6.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Mono.ApiTools.MSBuildTasks@0.6.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Mono.ApiTools.MSBuildTasks&version=0.6.0
                    
Install as a Cake Addin
#tool nuget:?package=Mono.ApiTools.MSBuildTasks&version=0.6.0
                    
Install as a Cake Tool

Mono.ApiTools.MSBuildTasks

MSBuild tasks to help with adjusting .NET assemblies during a build.

โšก Quick Start

dotnet add package Mono.ApiTools.MSBuildTasks

Then use the tasks in your MSBuild project files (.csproj, .targets, etc.).

Features

๐Ÿ“„ GeneratePublicApiFiles

Generate PublicAPI.Shipped.txt and PublicAPI.Unshipped.txt files compatible with Microsoft.CodeAnalysis.PublicApiAnalyzers for tracking API surface changes. Supports nullable annotations, oblivious markers, and [Experimental] attribute prefixes.

<GeneratePublicApiFiles
    Assembly="$(OutputPath)YourLibrary.dll"
    Files="@(PublicApiFiles)"
    ReferenceSearchPaths="@(ReferencePath->'%(RootDir)%(Directory)')" />
Property Required Description
Assembly โœ… The assembly to generate public API files from
Files โœ… The PublicAPI.Shipped.txt and PublicAPI.Unshipped.txt file items
ReferenceSearchPaths Directories to search for assembly dependencies

๐Ÿงน RemoveObsoleteSymbols

Remove [Obsolete] types and members from assemblies โ€” useful for cleaning up reference assemblies.

<RemoveObsoleteSymbols
    Assembly="$(OutputPath)YourAssembly.dll"
    OnlyErrors="true"
    OutputAssembly="$(OutputPath)YourAssembly.ref.dll" />
Property Required Description
Assembly โœ… The assembly to scan
OnlyErrors Only remove [Obsolete("...", true)] error members (default: true)
OutputAssembly Output path; defaults to modifying the input assembly in place

๐Ÿ”ง AdjustReferencedAssemblyVersion

Update an assembly reference version to match the actual referenced assembly โ€” useful for strong-named assemblies that need version alignment.

<AdjustReferencedAssemblyVersion
    Assembly="$(OutputPath)YourAssembly.dll"
    ReferencedAssembly="$(OutputPath)Dependency.dll" />
Property Required Description
Assembly โœ… The assembly to modify
ReferencedAssembly โœ… The reference assembly providing the correct version
OutputAssembly Output path; defaults to modifying the input assembly in place

๐Ÿ”„ ReplaceReferencedAssembly

Replace one assembly reference with another entirely โ€” name, version, public key token and all.

<ReplaceReferencedAssembly
    Assembly="$(OutputPath)YourAssembly.dll"
    ReferencedAssemblyName="OldDependency"
    NewReference="$(OutputPath)NewDependency.dll" />
Property Required Description
Assembly โœ… The assembly to modify
ReferencedAssemblyName โœ… Name of the existing reference to replace
NewReference โœ… The new reference assembly
OutputAssembly Output path; defaults to modifying the input assembly in place

Common Use Cases

  • API surface management โ€” Generate and maintain PublicAPI files for library versioning
  • Reference assemblies โ€” Remove obsolete symbols from contract assemblies
  • Strong-named assemblies โ€” Align reference versions without recompiling
  • Assembly binding โ€” Redirect references to different assembly implementations

๐Ÿ“– GitHub Repository ยท MIT License

There are no supported framework assets in this package.

Learn more about Target Frameworks and .NET Standard.

  • .NETStandard 2.0

    • No dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories (3)

Showing the top 3 popular GitHub repositories that depend on Mono.ApiTools.MSBuildTasks:

Repository Stars
dotnet/maui
.NET MAUI is the .NET Multi-platform App UI, a framework for building native device applications spanning mobile, tablet, and desktop.
mono/SkiaSharp
SkiaSharp is a cross-platform 2D graphics API for .NET platforms based on Google's Skia Graphics Library. It provides a comprehensive 2D API that can be used across mobile, server and desktop models to render images.
dotnet/android-libraries
.NET for Android bindings for Google's libraries, such as AndroidX, GooglePlayServices, Firebase, and MLKit and their 3rd party dependency libraries.
Version Downloads Last Updated
0.6.0 216 6/18/2026
0.5.0 239 3/18/2026
0.5.0-preview.1 73 3/18/2026
0.4.0 5,589 7/8/2025
0.3.0 1,397 3/7/2024
0.2.0 217 3/6/2024
0.1.0 2,532 8/24/2021