Skip to content

Use Runtime=NET feature in RepoTasks#65262

Merged
wtgodbe merged 5 commits intomainfrom
RemoveNetFxFromRepoTasks
Apr 14, 2026
Merged

Use Runtime=NET feature in RepoTasks#65262
wtgodbe merged 5 commits intomainfrom
RemoveNetFxFromRepoTasks

Conversation

@ViktorHofer
Copy link
Copy Markdown
Member

{PR title}

  • You've read the Contributor Guide and Code of Conduct.
  • You've included unit or integration tests for your change, where applicable.
  • You've included inline docs for your change, where applicable.
  • There's an open issue for the PR that you are making. If you'd like to propose a new feature or change, please open an issue to discuss the change or find an existing issue.

Summary of the changes (Less than 80 chars)

Description

{Detail}

Fixes #{bug number} (in this specific format)

Copilot AI review requested due to automatic review settings January 29, 2026 09:21
@ViktorHofer ViktorHofer requested review from a team and wtgodbe as code owners January 29, 2026 09:21
@github-actions github-actions Bot added the needs-area-label Used by the dotnet-issue-labeler to label those issues which couldn't be triaged automatically label Jan 29, 2026
@ViktorHofer ViktorHofer force-pushed the RemoveNetFxFromRepoTasks branch from 97a117e to 98ffc86 Compare January 29, 2026 09:22
Copy link
Copy Markdown
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 modernizes the RepoTasks build infrastructure by leveraging MSBuild's Runtime="NET" feature to simplify the project from multi-targeting (.NET Framework and .NET Core) to a single .NET Core target framework. This eliminates conditional logic and .NET Framework-specific code while maintaining all required functionality.

Changes:

  • Simplified task assembly loading by using MSBuild's Runtime="NET" attribute on UsingTask elements
  • Removed multi-targeting support, consolidating to a single .NET Core target framework
  • Eliminated .NET Framework-specific code and dependencies (GetMsiProperty task, MSI-related packages)

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.

File Description
eng/tools/RepoTasks/RepoTasks.tasks Simplified task loading using Runtime="NET" attribute; removed conditional MSBuildRuntimeType logic and GetMsiProperty task reference
eng/tools/RepoTasks/RepoTasks.csproj Changed from multi-targeting to single TargetFramework; added AppendTargetFrameworkToOutputPath=false; removed .NET Framework-specific dependencies and conditional compilation
eng/tools/RepoTasks/GetMsiProperty.cs Deleted .NET Framework-only MSI property reading task
eng/tools/RepoTasks/GenerateTestDevCert.cs Explicitly qualified base class as Microsoft.Build.Utilities.Task for clarity

@ViktorHofer ViktorHofer marked this pull request as draft January 29, 2026 18:26
@ViktorHofer
Copy link
Copy Markdown
Member Author

I forgot to check if any of these tasks are used in a non Microsoft.NET.Sdk project as that's currently not supported.

@gfoidl gfoidl added area-infrastructure Includes: MSBuild projects/targets, build scripts, CI, Installers and shared framework and removed needs-area-label Used by the dotnet-issue-labeler to label those issues which couldn't be triaged automatically labels Jan 30, 2026
Removed the UsingTask declaration for RepoTasks.GetMsiProperty.
Removed explicit references to Newtonsoft.Json and NuGet.Packaging. Updated Microsoft.Build package references to exclude runtime assets.
@ViktorHofer ViktorHofer marked this pull request as ready for review April 14, 2026 12:22
@ViktorHofer
Copy link
Copy Markdown
Member Author

@wtgodbe should be finally ready now :)

@dotnet-policy-service dotnet-policy-service Bot added this to the 11.0-preview4 milestone Apr 14, 2026
@ViktorHofer ViktorHofer reopened this Apr 14, 2026
Copy link
Copy Markdown
Member

@wtgodbe wtgodbe left a comment

Choose a reason for hiding this comment

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

Nice!

@wtgodbe wtgodbe merged commit 12c6b87 into main Apr 14, 2026
26 checks passed
@wtgodbe wtgodbe deleted the RemoveNetFxFromRepoTasks branch April 14, 2026 17:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area-infrastructure Includes: MSBuild projects/targets, build scripts, CI, Installers and shared framework

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants