Skip to content

Conversation

@elinor-fung
Copy link
Member

@elinor-fung elinor-fung commented Dec 4, 2025

  • Remove ResolveReadyToRunCompilers from Microsoft.NET.Publish.targets. This was always overriding (and identical to) the one in Microsoft.NET.CrossGen.targets
  • Add properties for CrossGenTargetsPath and CrossGenTasksPath that can be set to import a different targets file and use a different task assembly. This is more in line with what we do for ILLink and should allow simplification of how dotnet/runtime uses in-repo crossgen targets in dotnet/runtime

Copilot AI review requested due to automatic review settings December 4, 2025 19:56
@elinor-fung elinor-fung requested review from a team as code owners December 4, 2025 19:56
Copilot finished reviewing on behalf of elinor-fung December 4, 2025 20:00
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR improves the extensibility of ReadyToRun crossgen tasks and targets by introducing customizable path properties. It removes duplicate target definitions and establishes a consistent pattern for overriding build behavior.

Key Changes

  • Introduced CrossGenTargetsPath property to allow customization of the CrossGen targets file import location
  • Introduced CrossGenTasksPath property to allow customization of the task assembly used for ReadyToRun compilation
  • Removed duplicate ResolveReadyToRunCompilers target from Microsoft.NET.Publish.targets that was overriding the identical definition in Microsoft.NET.CrossGen.targets

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.Sdk.targets Added CrossGenTargetsPath property and updated import statement to use it instead of hardcoded path
src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.Publish.targets Removed duplicate ResolveReadyToRunCompilers target definition (now only defined in CrossGen.targets)
src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.CrossGen.targets Added CrossGenTasksPath property and updated all three UsingTask declarations to reference it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants