[net10.0] Local and Copilot dev can generate public apis#30661
Merged
[net10.0] Local and Copilot dev can generate public apis#30661
Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This is a backport that enables local development and Copilot workflows to automatically generate public API files instead of only validating them. The change introduces a new build target that uses Mono.ApiTools.MSBuildTasks to generate public API files during the build process, while maintaining validation-only behavior for CI/CD environments.
Key changes:
- Adds conditional logic to determine whether to generate or validate public API files based on environment context
- Introduces a new MSBuild target for generating public API files using Mono.ApiTools.MSBuildTasks
- Removes unnecessary public API analyzer warning suppressions since generation handles API changes automatically
Reviewed Changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| src/PublicAPI.targets | Adds conditional logic and new MSBuild target for public API generation |
| src/SingleProject/Resizetizer/src/Resizetizer.csproj | Removes version constraint from Mono.ApiTools.MSBuildTasks package reference |
| src/Controls/src/Core/Layout/FlexLayout.cs | Removes public API analyzer warning suppressions |
| src/Controls/src/Core/Element/Element.cs | Removes public API analyzer warning suppressions |
| eng/Versions.props | Adds version definition for Mono.ApiTools.MSBuildTasks |
| eng/NuGetVersions.targets | Adds package reference update for Mono.ApiTools.MSBuildTasks |
fdded1c to
c3d8748
Compare
* Local and Copilot dev can generate public apis Currently, the only way is to use the IDE and the lightbulb - or manually. This is often not successful and AI still struggles as well. The new version of the Mono.ApiTools.MSBuildTasks package now has the ability to generate the files and they can be checked in during development to show the actual API changes. The rules would be if this is release of CI, then it is set to Validate only, and then only if it is debug AND not CI (ie: local) will it enable generation. # Conflicts: # src/Controls/src/Core/PublicAPI/net-android/PublicAPI.Unshipped.txt # src/Controls/src/Core/PublicAPI/net-ios/PublicAPI.Unshipped.txt # src/Controls/src/Core/PublicAPI/net-maccatalyst/PublicAPI.Unshipped.txt # src/Controls/src/Core/PublicAPI/net-tizen/PublicAPI.Unshipped.txt # src/Controls/src/Core/PublicAPI/net-windows/PublicAPI.Unshipped.txt # src/Controls/src/Core/PublicAPI/net/PublicAPI.Unshipped.txt # src/Controls/src/Core/PublicAPI/netstandard/PublicAPI.Unshipped.txt
Member
|
/azp run |
|
Azure Pipelines successfully started running 3 pipeline(s). |
PureWeen
approved these changes
Jul 17, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Backport of #30500