Skip to content

Remove ResolverTargetFramework and ToolsetTargetFramework properties, use SdkTargetFramework directly#52743

Merged
marcpopMSFT merged 7 commits intomainfrom
copilot/remove-resolver-target-framework
Feb 3, 2026
Merged

Remove ResolverTargetFramework and ToolsetTargetFramework properties, use SdkTargetFramework directly#52743
marcpopMSFT merged 7 commits intomainfrom
copilot/remove-resolver-target-framework

Conversation

Copy link
Contributor

Copilot AI commented Jan 30, 2026

Removes the ResolverTargetFramework and ToolsetTargetFramework properties, which were simply aliasing SdkTargetFramework. All references now use SdkTargetFramework directly.

Changes

  • Directory.Build.props: Removed ResolverTargetFramework and ToolsetTargetFramework property definitions
  • 6 resolver/library project files: Replaced $(ResolverTargetFramework) with $(SdkTargetFramework):
    • src/Resolvers/Microsoft.NET.Sdk.WorkloadMSBuildSdkResolver/*.csproj
    • src/Resolvers/Microsoft.DotNet.SdkResolver/*.csproj
    • src/Resolvers/Microsoft.NET.Sdk.WorkloadManifestReader/*.csproj
    • src/Resolvers/Microsoft.DotNet.NativeWrapper/*.csproj
    • src/Cli/Microsoft.DotNet.Cli.Utils/*.csproj
    • src/Microsoft.DotNet.TemplateLocator/*.csproj
  • 28 test/benchmark project files: Replaced $(ToolsetTargetFramework) with $(SdkTargetFramework):
    • benchmarks/MicroBenchmark/*.csproj
    • Various test projects in test/ directory

No functional change - both properties resolved to the same value.

Original prompt

Remove ResolverTargetFramework and replace with SdkTargetFramework


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Co-authored-by: marcpopMSFT <12663534+marcpopMSFT@users.noreply.github.com>
Copilot AI changed the title [WIP] Remove ResolverTargetFramework and replace with SdkTargetFramework Remove ResolverTargetFramework property, use SdkTargetFramework directly Jan 30, 2026
Copilot AI requested a review from marcpopMSFT January 30, 2026 01:20
@marcpopMSFT marcpopMSFT marked this pull request as ready for review January 30, 2026 21:37
Copilot AI review requested due to automatic review settings January 30, 2026 21:37
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 simplifies the build configuration by removing the redundant ResolverTargetFramework property, which was simply aliasing SdkTargetFramework. All project files now reference SdkTargetFramework directly.

Changes:

  • Removed ResolverTargetFramework property definition from Directory.Build.props
  • Updated 6 project files to use $(SdkTargetFramework) instead of $(ResolverTargetFramework) for their TargetFrameworks property

Reviewed changes

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

Show a summary per file
File Description
Directory.Build.props Removed the redundant ResolverTargetFramework property definition and its explanatory comment
src/Resolvers/Microsoft.NET.Sdk.WorkloadManifestReader/Microsoft.NET.Sdk.WorkloadManifestReader.csproj Replaced $(ResolverTargetFramework) with $(SdkTargetFramework) in TargetFrameworks property
src/Resolvers/Microsoft.NET.Sdk.WorkloadMSBuildSdkResolver/Microsoft.NET.Sdk.WorkloadMSBuildSdkResolver.csproj Replaced $(ResolverTargetFramework) with $(SdkTargetFramework) in TargetFrameworks property
src/Resolvers/Microsoft.DotNet.SdkResolver/Microsoft.DotNet.SdkResolver.csproj Replaced two instances of $(ResolverTargetFramework) with $(SdkTargetFramework) in TargetFrameworks properties
src/Resolvers/Microsoft.DotNet.NativeWrapper/Microsoft.DotNet.NativeWrapper.csproj Replaced $(ResolverTargetFramework) with $(SdkTargetFramework) in TargetFrameworks property
src/Microsoft.DotNet.TemplateLocator/Microsoft.DotNet.TemplateLocator.csproj Replaced two instances of $(ResolverTargetFramework) with $(SdkTargetFramework) in TargetFrameworks properties
src/Cli/Microsoft.DotNet.Cli.Utils/Microsoft.DotNet.Cli.Utils.csproj Replaced $(ResolverTargetFramework) with $(SdkTargetFramework) in TargetFrameworks property

@marcpopMSFT
Copy link
Member

@ViktorHofer you looked through some of this during the the net11 update. Do you know if we still need a separate value for ToolsetTargetFramework either? I mostly removed this based on the comment in the file and my memory agreeing that we only had it for VSMac.

@ViktorHofer
Copy link
Member

Agreed, we shouldn't need any of these anymore.

1 similar comment
@ViktorHofer
Copy link
Member

Agreed, we shouldn't need any of these anymore.

@marcpopMSFT
Copy link
Member

@copilot I believe ToolsetTargetFramework can be replaced by SdkTargetFramework as well. Can you confirm and make that change?

Co-authored-by: marcpopMSFT <12663534+marcpopMSFT@users.noreply.github.com>
Copilot AI requested review from a team, tmat and vijayrkn as code owners February 2, 2026 23:57
Copy link
Contributor Author

Copilot AI commented Feb 2, 2026

@copilot I believe ToolsetTargetFramework can be replaced by SdkTargetFramework as well. Can you confirm and make that change?

Confirmed and done. Replaced all references to ToolsetTargetFramework with SdkTargetFramework in commit 018c594. The property was removed from Directory.Build.props and all 28 test/benchmark project files were updated.

Copilot AI changed the title Remove ResolverTargetFramework property, use SdkTargetFramework directly Remove ResolverTargetFramework and ToolsetTargetFramework properties, use SdkTargetFramework directly Feb 2, 2026
@ViktorHofer ViktorHofer requested review from a team as code owners February 3, 2026 09:12
@ViktorHofer
Copy link
Member

@marcpopMSFT I pushed two commits to also avoid the net472 hardcodes by using the NETFRAMEWORK preprocessor directive in code and the NetFrameworkToolCurrent property in msbuild.

@marcpopMSFT marcpopMSFT merged commit da969d4 into main Feb 3, 2026
25 checks passed
@marcpopMSFT marcpopMSFT deleted the copilot/remove-resolver-target-framework branch February 3, 2026 17:42
@marcpopMSFT
Copy link
Member

/backport to release/10.0.3xx

@github-actions
Copy link
Contributor

github-actions bot commented Mar 6, 2026

Started backporting to release/10.0.3xx (link to workflow run)

@github-actions
Copy link
Contributor

github-actions bot commented Mar 6, 2026

@marcpopMSFT backporting to release/10.0.3xx failed, the patch most likely resulted in conflicts. Please backport manually!

git am output
$ git am --3way --empty=keep --ignore-whitespace --keep-non-patch changes.patch

Creating an empty commit: Initial plan
Applying: Replace ResolverTargetFramework with SdkTargetFramework
Using index info to reconstruct a base tree...
M	Directory.Build.props
M	src/Cli/Microsoft.DotNet.Cli.Utils/Microsoft.DotNet.Cli.Utils.csproj
Falling back to patching base and 3-way merge...
Auto-merging Directory.Build.props
CONFLICT (content): Merge conflict in Directory.Build.props
Auto-merging src/Cli/Microsoft.DotNet.Cli.Utils/Microsoft.DotNet.Cli.Utils.csproj
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
hint: When you have resolved this problem, run "git am --continue".
hint: If you prefer to skip this patch, run "git am --skip" instead.
hint: To restore the original branch and stop patching, run "git am --abort".
hint: Disable this message with "git config set advice.mergeConflict false"
Patch failed at 0002 Replace ResolverTargetFramework with SdkTargetFramework
Error: The process '/usr/bin/git' failed with exit code 128

Link to workflow output

Copilot AI added a commit that referenced this pull request Mar 6, 2026
…work, use SdkTargetFramework directly

Co-authored-by: marcpopMSFT <12663534+marcpopMSFT@users.noreply.github.com>
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.

4 participants