Events
17 Mar, 23 - 21 Mar, 23
Join the meetup series to build scalable AI solutions based on real-world use cases with fellow developers and experts.
Register nowThis browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Package validation tooling allows you, as a library developer, to validate that your packages are consistent and well formed. It provides the following checks:
You can run package validation either as an MSBuild task or using the Microsoft.DotNet.ApiCompat.Tool global tool. If your app isn't packable, use assembly validation instead.
You enable package validation in your .NET project by setting the EnablePackageValidation
property to true
.
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>netstandard2.0;net6.0</TargetFrameworks>
<EnablePackageValidation>true</EnablePackageValidation>
</PropertyGroup>
</Project>
EnablePackageValidation
runs a series of checks after the Pack
task. There are some additional checks that can be run by setting other MSBuild properties. For more information, see Package validation properties.
There are three different validators that verify your package as part of the Pack
task:
For information about suppressing compatibility warnings, see How to suppress.
.NET feedback
.NET is an open source project. Select a link to provide feedback:
Events
17 Mar, 23 - 21 Mar, 23
Join the meetup series to build scalable AI solutions based on real-world use cases with fellow developers and experts.
Register nowTraining
Module
Learn to validate Teams apps extensible across Microsoft 365 - Training
In this module, our focus is on ensuring that the extensible Teams apps meet the validation requirements.
Documentation
Learn how assembly validation can be used to develop consistent and well-formed multi-targeting assemblies.
API compatibility tools - .NET
Learn how .NET compatibility features, including MSBuild tasks and a command-line tool, can be used to develop consistent and well-formed multi-targeting libraries.
Validate Compatible Frameworks Inside a Package - .NET
Learn how to detect issues with API surface, identity, and compatibility across different target frameworks in a package.