Conversation
Co-authored-by: rainersigwald <3347530+rainersigwald@users.noreply.github.com>
- Update eng/Versions.props: SystemMemory, SystemRuntimeCompilerServicesUnsafe, SystemThreadingTasksExtensions from 4.6.0/6.1.0/4.6.0 to 4.6.3/6.1.2/4.6.3 - Update src/Directory.Build.targets: Update frozen maintenance package versions to match 10.0.0 package requirements - Update binding redirects in app.config and app.amd64.config for System.Numerics.Vectors to 4.1.6.0 Co-authored-by: rainersigwald <3347530+rainersigwald@users.noreply.github.com>
The 4.6.x versions of System.* packages use net462 target framework folders, not net461/net46. Updated Directory.Build.targets to reference the correct paths. Co-authored-by: rainersigwald <3347530+rainersigwald@users.noreply.github.com>
Do not update frozen maintenance package versions as they are frozen for important reasons. Reverted Directory.Build.targets to original state before my changes. Note: Build currently fails with dependency conflicts between 10.0.0 runtime packages and frozen maintenance package versions. Awaiting guidance on resolution approach. Co-authored-by: rainersigwald <3347530+rainersigwald@users.noreply.github.com>
…ime-packages-to-10-0-0 # Conflicts: # src/MSBuild/app.amd64.config # src/MSBuild/app.config
| <FrozenSystemTextJsonVersion>4.5.0</FrozenSystemTextJsonVersion> | ||
| <FrozenSystemThreadingChannelsVersion>4.7.1</FrozenSystemThreadingChannelsVersion> | ||
|
|
||
| <!-- In 10.x runtime packages started referencing live maintenance-packages outputs so pin several of them to 9.x --> |
There was a problem hiding this comment.
Extending the logic we had here is getting pretty unwieldy, but I'd like to go with it for now to unblock the VS update (and because I don't have a better idea for how to keep older MSBuild-API-using apps working).
There was a problem hiding this comment.
Pull request overview
This PR updates assembly binding redirects and package references from .NET 9.0.x versions to .NET 10.0.x versions. This change coordinates with Visual Studio to ensure MSBuild uses the latest runtime package versions while maintaining backward compatibility through binding redirects.
Changes:
- Updated NuGet package versions from 9.0.11 to 10.0.1 for runtime packages
- Updated assembly binding redirects from 9.0.0.11 to 10.0.0.1 (and other assembly version updates)
- Modified System.ValueTuple handling to no longer redistribute the DLL, relying on GAC redirection instead
Reviewed changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| src/Tasks/System.Resources.Extensions.pkgdef | Updated version redirects from 9.0.0.11 to 10.0.0.1 |
| src/Package/MSBuild.VSSetup/files.swr | Removed System.ValueTuple.dll from distribution (no longer redistributed) |
| src/MSBuild/app.config | Updated binding redirects for runtime packages to 10.0.0.1 and maintenance packages; added System.Threading.Channels redirect |
| src/MSBuild/app.amd64.config | Updated binding redirects and codeBase hints for runtime packages; removed codeBase for System.ValueTuple |
| src/MSBuild/ValidateMSBuildPackageDependencyVersions.cs | Added System.ValueTuple to ignore list and commented out special validation logic |
| src/MSBuild/MSBuild.csproj | Added System.ValueTuple package reference with ExcludeAssets="Build" |
| src/Directory.Build.targets | Added frozen version configuration for 9.0.11 runtime packages and expanded package download/reference replacement logic |
| eng/Versions.props | Updated maintenance package versions (System.Memory, System.Runtime.CompilerServices.Unsafe, System.Threading.Tasks.Extensions); added System.ValueTuple version |
| eng/Version.Details.xml | Updated all runtime package dependencies from 9.0.11 to 10.0.1 |
| eng/Version.Details.props | Updated all runtime package versions from 9.0.11 to 10.0.1 |
| Directory.Packages.props | Added System.ValueTuple package version entry |
| <FrozenSystemTextJsonVersion>4.5.0</FrozenSystemTextJsonVersion> | ||
| <FrozenSystemThreadingChannelsVersion>4.7.1</FrozenSystemThreadingChannelsVersion> |
There was a problem hiding this comment.
The properties FrozenSystemTextJsonVersion and FrozenSystemThreadingChannelsVersion are defined twice in this file. Lines 158-159 set them to 4.5.0 and 4.7.1 respectively, but then lines 172-173 override them with $(FrozenRuntimeVersionFor9) which equals 9.0.11. This means the first definitions are effectively ignored. Consider removing the duplicate definitions on lines 158-159 to avoid confusion.
| <FrozenSystemTextJsonVersion>4.5.0</FrozenSystemTextJsonVersion> | |
| <FrozenSystemThreadingChannelsVersion>4.7.1</FrozenSystemThreadingChannelsVersion> |
| if (String.Equals(name, "System.ValueTuple", StringComparison.OrdinalIgnoreCase) && | ||
| String.Equals(version, "4.0.0.0") && String.Equals(assemblyVersion, "4.0.3.0")) | ||
| { | ||
| foundSystemValueTuple = true; | ||
| // foundSystemValueTuple = true; | ||
| } |
There was a problem hiding this comment.
The validation logic for System.ValueTuple is commented out but not removed. Since System.ValueTuple has been added to the assembliesToIgnore list on line 23, and the validation check is commented out on lines 97, 117-120, consider removing this dead code entirely (lines 94-98 and 117-120) to improve code clarity and maintainability.
| // Microsoft.NET.StringTools uses API not available in net35, but since we need it to work for TaskHosts as well, there are simpler versions implemented for that. Ensure it's the right version. | ||
| // Microsoft.Activities.Build and XamlBuildTask are loaded within an AppDomain in the XamlBuildTask after having been loaded from the GAC elsewhere. See https://github.com/dotnet/msbuild/pull/856 | ||
| private string[] assembliesToIgnore = { "Microsoft.Build.Conversion.Core", "Microsoft.NET.StringTools.net35", "Microsoft.Build.Engine", "Microsoft.Activities.Build", "XamlBuildTask" }; | ||
| private string[] assembliesToIgnore = { "Microsoft.Build.Conversion.Core", "Microsoft.NET.StringTools.net35", "Microsoft.Build.Engine", "Microsoft.Activities.Build", "System.ValueTuple", "XamlBuildTask" }; |
There was a problem hiding this comment.
Field 'assembliesToIgnore' can be 'readonly'.
| private string[] assembliesToIgnore = { "Microsoft.Build.Conversion.Core", "Microsoft.NET.StringTools.net35", "Microsoft.Build.Engine", "Microsoft.Activities.Build", "System.ValueTuple", "XamlBuildTask" }; | |
| private readonly string[] assembliesToIgnore = { "Microsoft.Build.Conversion.Core", "Microsoft.NET.StringTools.net35", "Microsoft.Build.Engine", "Microsoft.Activities.Build", "System.ValueTuple", "XamlBuildTask" }; |
The .100 version delivered MetadataLoadContext 10.0.0.0 but we now referenced 10.0.0.1. Bump it.
|
@YuliiaKovalova what is 62ef282 for in this PR? |
while I was investigating the test failure I made cleanup. The coverage matrix is the same |
|
It's not strictly required here and I want to revisit the cleanup but I don't want to reset the PR job queue for this PR :( |
|
Please next time avoid doing that as part of an unrelated PR. I only noticed this because I again checked this PR out. The |
|
We got test results from everything and Code Coverage is number 323 in queue to get a machine--I'm going to merge around it to hit the VS-side timeline. |
Coordinated update with VS. --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: YuliiaKovalova <95473390+YuliiaKovalova@users.noreply.github.com>
This is a change we're coordinating with VS in the internal thread https://teams.microsoft.com/l/chat/19:af4ae0ed01474ee6851395013feb593a@thread.v2/conversations?context=%7B%22contextType%22%3A%22chat%22%7D
Supersedes #12907.