Skip to content

Migrate WarnOnPreserveAttribute from ILLink step to MSBuild task#10693

Merged
jonathanpeppers merged 3 commits intomainfrom
dev/sbomer/warn-preserve
Jan 15, 2026
Merged

Migrate WarnOnPreserveAttribute from ILLink step to MSBuild task#10693
jonathanpeppers merged 3 commits intomainfrom
dev/sbomer/warn-preserve

Conversation

@sbomer
Copy link
Member

@sbomer sbomer commented Jan 14, 2026

Replace the ILLink custom step with an MSBuild task that runs before _RunILLink. This simplifies the build pipeline by removing a dependency on the ILLink step infrastructure while maintaining the same behavior.

The new CheckForObsoletePreserveAttribute task uses System.Reflection.Metadata for fast metadata scanning instead of Mono.Cecil.

sbomer added 2 commits January 9, 2026 11:10
Replace the ILLink custom step with an MSBuild task that runs before
_RunILLink. This simplifies the build pipeline by removing a dependency
on the ILLink step infrastructure while maintaining the same behavior.

The new CheckForObsoletePreserveAttribute task uses System.Reflection.Metadata
for fast metadata scanning instead of Mono.Cecil.
Address PR feedback: move _CheckForObsoletePreserveAttribute target from
ILLink.targets to AssemblyResolution.targets so it runs on all builds,
not just Release/trimmed builds. This gives developers earlier feedback
about using the obsolete attribute.
Copy link
Member

@jonathanpeppers jonathanpeppers left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are some flaky test failures we can ignore, merging.

@jonathanpeppers jonathanpeppers merged commit a84856e into main Jan 15, 2026
1 of 2 checks passed
@jonathanpeppers jonathanpeppers deleted the dev/sbomer/warn-preserve branch January 15, 2026 23:28
@github-actions github-actions bot locked and limited conversation to collaborators Feb 15, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants