Port #52743 to release/10.0.3xx: Remove ResolverTargetFramework and ToolsetTargetFramework aliases#53309
Port #52743 to release/10.0.3xx: Remove ResolverTargetFramework and ToolsetTargetFramework aliases#53309Copilot wants to merge 3 commits intorelease/10.0.3xxfrom
Conversation
|
@copilot fix the build breaks:
|
Fixed in c4e7e7e. When
Updated both references in the project file to use |
…work, use SdkTargetFramework directly Co-authored-by: marcpopMSFT <12663534+marcpopMSFT@users.noreply.github.com>
…d netframeworkDefinitions.cs Co-authored-by: marcpopMSFT <12663534+marcpopMSFT@users.noreply.github.com>
c4e7e7e to
95cd079
Compare
There was a problem hiding this comment.
Pull request overview
Ports the main-branch change to the release/10.0.3xx line by removing the ToolsetTargetFramework / ResolverTargetFramework aliases and standardizing on $(SdkTargetFramework), while also normalizing .NET Framework conditional compilation to NETFRAMEWORK.
Changes:
- Remove
ToolsetTargetFrameworkandResolverTargetFrameworkfromDirectory.Build.propsand update all affected.csprojfiles to use$(SdkTargetFramework). - Replace
#if NET472/#if NET472_OR_GREATERwith#if NETFRAMEWORKin relevant source files. - Rename the Containers net472-only definitions file and update project includes/removes accordingly, plus a couple comment updates.
Reviewed changes
Copilot reviewed 48 out of 49 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| test/trustedroots.Tests/trustedroots.Tests.csproj | Switch test TFM from $(ToolsetTargetFramework) to $(SdkTargetFramework). |
| test/sdk-tasks.Tests/sdk-tasks.Tests.csproj | Replace $(ToolsetTargetFramework) usages in multi-targeting and conditional OutputType. |
| test/msbuild.Integration.Tests/msbuild.Integration.Tests.csproj | Switch test TFM to $(SdkTargetFramework). |
| test/dotnet.Tests/dotnet.Tests.csproj | Switch test TFM to $(SdkTargetFramework). |
| test/dotnet-watch.Tests/dotnet-watch.Tests.csproj | Switch test TFM to $(SdkTargetFramework). |
| test/dotnet-watch-test-browser/dotnet-watch-test-browser.csproj | Switch test TFM to $(SdkTargetFramework). |
| test/dotnet-new.IntegrationTests/dotnet-new.IntegrationTests.csproj | Switch test TFM to $(SdkTargetFramework). |
| test/SDDLTests/SDDLTests.csproj | Switch test TFM(s) to $(SdkTargetFramework). |
| test/Msbuild.Tests.Utilities/Msbuild.Tests.Utilities.csproj | Switch test TFM to $(SdkTargetFramework). |
| test/Microsoft.Win32.Msi.Tests/Microsoft.Win32.Msi.Tests.csproj | Switch test TFM(s) and conditional OutputType to $(SdkTargetFramework). |
| test/Microsoft.Win32.Msi.Manual.Tests/Microsoft.Win32.Msi.Manual.Tests.csproj | Switch manual test TFM(s) to $(SdkTargetFramework). |
| test/Microsoft.NET.Sdk.WorkloadManifestReader.Tests/Microsoft.NET.Sdk.WorkloadManifestReader.Tests.csproj | Switch test TFM(s) and conditional OutputType to $(SdkTargetFramework). |
| test/Microsoft.NET.Sdk.Publish.Tasks.Tests/Microsoft.NET.Sdk.Publish.Tasks.Tests.csproj | Switch test TFM(s) and conditional OutputType to $(SdkTargetFramework). |
| test/Microsoft.DotNet.Tools.Tests.ComponentMocks/Microsoft.DotNet.Tools.Tests.ComponentMocks.csproj | Switch test TFM to $(SdkTargetFramework). |
| test/Microsoft.DotNet.TemplateLocator.Tests/Microsoft.DotNet.TemplateLocator.Tests.csproj | Switch test TFM(s) + build-pass conditional to $(SdkTargetFramework). |
| test/Microsoft.DotNet.PackageValidation.Tests/Microsoft.DotNet.PackageValidation.Tests.csproj | Switch TFM(s) and conditional OutputType to $(SdkTargetFramework). |
| test/Microsoft.DotNet.PackageInstall.Tests/Microsoft.DotNet.PackageInstall.Tests.csproj | Switch test TFM to $(SdkTargetFramework). |
| test/Microsoft.DotNet.GenAPI.Tests/Microsoft.DotNet.GenAPI.Tests.csproj | Switch test TFM and conditional OutputType to $(SdkTargetFramework). |
| test/Microsoft.DotNet.Cli.Utils.Tests/Microsoft.DotNet.Cli.Utils.Tests.csproj | Switch test TFM to $(SdkTargetFramework). |
| test/Microsoft.DotNet.ApiSymbolExtensions.Tests/Microsoft.DotNet.ApiSymbolExtensions.Tests.csproj | Switch TFM(s) and conditional OutputType to $(SdkTargetFramework). |
| test/Microsoft.DotNet.ApiDiff.Tests/Microsoft.DotNet.ApiDiff.Tests.csproj | Switch test TFM to $(SdkTargetFramework). |
| test/Microsoft.DotNet.ApiCompatibility.Tests/Microsoft.DotNet.ApiCompatibility.Tests.csproj | Switch TFM(s) and conditional OutputType to $(SdkTargetFramework). |
| test/Microsoft.DotNet.ApiCompat.Tests/Microsoft.DotNet.ApiCompat.Tests.csproj | Switch TFM(s) and conditional OutputType to $(SdkTargetFramework). |
| test/Microsoft.DotNet.ApiCompat.IntegrationTests/Microsoft.DotNet.ApiCompat.IntegrationTests.csproj | Switch TFM(s) and conditional OutputType to $(SdkTargetFramework). |
| test/EndToEnd.Tests/EndToEnd.Tests.csproj | Switch test TFM to $(SdkTargetFramework). |
| test/ArgumentsReflector/ArgumentsReflector.csproj | Switch test utility TFM to $(SdkTargetFramework). |
| test/ArgumentForwarding.Tests/ArgumentForwarding.Tests.csproj | Switch test TFM to $(SdkTargetFramework). |
| src/WebSdk/Publish/Tasks/Tasks/MsDeploy/VsMsdeploy.cs | Normalize preprocessor checks from NET472 to NETFRAMEWORK. |
| src/WebSdk/Publish/Tasks/Tasks/MsDeploy/MSDeploy.cs | Normalize preprocessor checks from NET472 to NETFRAMEWORK. |
| src/WebSdk/Publish/Tasks/Tasks/MsDeploy/CreateParameterFile.cs | Normalize preprocessor checks from NET472 to NETFRAMEWORK. |
| src/WebSdk/Publish/Tasks/Tasks/MsDeploy/CreateManifestFile.cs | Normalize preprocessor checks from NET472 to NETFRAMEWORK. |
| src/WebSdk/Publish/Tasks/MsDeploy/VsMSDeployObject.cs | Normalize preprocessor checks from NET472 to NETFRAMEWORK. |
| src/WebSdk/Publish/Tasks/MsDeploy/DynamicAssembly.cs | Normalize preprocessor checks from NET472 to NETFRAMEWORK. |
| src/WebSdk/Publish/Tasks/MsDeploy/CommonUtility.cs | Normalize preprocessor checks from NET472 to NETFRAMEWORK. |
| src/StaticWebAssetsSdk/Tasks/Data/StaticWebAssetEndpointResponseHeader.cs | Normalize GetHashCode conditional compilation to NETFRAMEWORK. |
| src/StaticWebAssetsSdk/Tasks/Data/StaticWebAssetEndpointProperty.cs | Normalize GetHashCode conditional compilation to NETFRAMEWORK. |
| src/StaticWebAssetsSdk/Tasks/Data/StaticWebAssetEndpoint.cs | Normalize GetHashCode conditional compilation to NETFRAMEWORK. |
| src/StaticWebAssetsSdk/Tasks/Data/StaticWebAsset.cs | Update comment to reference “.NET Framework” rather than “.net472”. |
| src/Resolvers/Microsoft.NET.Sdk.WorkloadManifestReader/Microsoft.NET.Sdk.WorkloadManifestReader.csproj | Replace $(ResolverTargetFramework) with $(SdkTargetFramework). |
| src/Resolvers/Microsoft.NET.Sdk.WorkloadMSBuildSdkResolver/Microsoft.NET.Sdk.WorkloadMSBuildSdkResolver.csproj | Replace $(ResolverTargetFramework) with $(SdkTargetFramework). |
| src/Resolvers/Microsoft.DotNet.SdkResolver/Microsoft.DotNet.SdkResolver.csproj | Replace $(ResolverTargetFramework) with $(SdkTargetFramework) (including build-pass conditional). |
| src/Resolvers/Microsoft.DotNet.NativeWrapper/Microsoft.DotNet.NativeWrapper.csproj | Replace $(ResolverTargetFramework) with $(SdkTargetFramework). |
| src/Microsoft.DotNet.TemplateLocator/Microsoft.DotNet.TemplateLocator.csproj | Replace $(ResolverTargetFramework) with $(SdkTargetFramework) (including build-pass conditional). |
| src/Layout/redist/targets/Crossgen.targets | Update comment referencing net472 to netframework terminology. |
| src/Containers/Microsoft.NET.Build.Containers/netframeworkDefinitions.cs | Add renamed netframework definitions/polyfills file. |
| src/Containers/Microsoft.NET.Build.Containers/Microsoft.NET.Build.Containers.csproj | Update compile include/remove entries to reference renamed definitions file. |
| src/Cli/Microsoft.DotNet.Cli.Utils/Polyfills.cs | Normalize preprocessor check from NET472 to NETFRAMEWORK. |
| src/Cli/Microsoft.DotNet.Cli.Utils/Microsoft.DotNet.Cli.Utils.csproj | Replace $(ResolverTargetFramework) with $(SdkTargetFramework). |
| Directory.Build.props | Remove ToolsetTargetFramework / ResolverTargetFramework alias properties. |
src/Containers/Microsoft.NET.Build.Containers/Microsoft.NET.Build.Containers.csproj
Outdated
Show resolved
Hide resolved
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
|
@tmat did you still want this? if so, approve and I'll merge. |
|
I scanned and the changes look right and look like what is in main (modulo a few files that are only in main). |
|
Yes, please! |
ToolsetTargetFrameworkandResolverTargetFrameworkproperty definitions fromDirectory.Build.props$(ResolverTargetFramework)with$(SdkTargetFramework)in resolver/library project files$(ToolsetTargetFramework)with$(SdkTargetFramework)in test project files (27 files)#if NET472/#if NET472_OR_GREATERwith#if NETFRAMEWORKin source filessrc/Containers/Microsoft.NET.Build.Containers/net472Definitions.cstonetframeworkDefinitions.csMicrosoft.NET.Build.Containers.csprojto reference the renamed file (netframeworkDefinitions.cs) in both Include and Remove itemsCrossgen.targetsandStaticWebAsset.cs💡 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.