-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Use newer maintenance-packages at runtime #11677
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
rainersigwald
merged 6 commits into
dotnet:vs17.14
from
rainersigwald:exp/maintenance-packages-but-lies
Apr 4, 2025
Merged
Use newer maintenance-packages at runtime #11677
rainersigwald
merged 6 commits into
dotnet:vs17.14
from
rainersigwald:exp/maintenance-packages-but-lies
Apr 4, 2025
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Avoids problems caused by updating references in MSBuild for core types that are likely to be used in applications that use MSBuildLocator to call our API: if we update our baked-in references, we will break some of them, including Roslyn's MSBuildWorkspace BuildHost. If instead we bake in the same references we've been using, but ship and binding redirect to the newer versions, we can update (at runtime in normal operation) while still being functional in older executables that ship a stale version (and thus don't binding redirect to a new version).
…packages-but-lies
…y shipped" (dotnet#11659) This reverts commit 026c880.
Contributor
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot wasn't able to review any files in this pull request.
Files not reviewed (8)
- eng/Packages.props: Language not supported
- eng/Versions.props: Language not supported
- src/Directory.Build.targets: Language not supported
- src/MSBuild.Bootstrap/MSBuild.Bootstrap.csproj: Language not supported
- src/MSBuild/app.amd64.config: Language not supported
- src/MSBuild/app.config: Language not supported
- src/Package/DevDivPackage/DevDivPackage.csproj: Language not supported
- src/Samples/Directory.Build.props: Language not supported
rainersigwald
commented
Apr 3, 2025
YuliiaKovalova
approved these changes
Apr 3, 2025
carlossanlop
reviewed
Apr 3, 2025
AArnott
reviewed
Apr 3, 2025
carlossanlop
reviewed
Apr 3, 2025
carlossanlop
reviewed
Apr 3, 2025
carlossanlop
reviewed
Apr 3, 2025
carlossanlop
reviewed
Apr 3, 2025
carlossanlop
approved these changes
Apr 3, 2025
Contributor
carlossanlop
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nothing blocking, just questions.
ericstj
reviewed
Apr 3, 2025
akoeplinger
approved these changes
Apr 4, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Visual Studio 17.14 updated to newer versions of the assemblies built in https://github.com/dotnet/maintenance-packages, which caused some performance regressions related to the mismatch between MSBuild.exe and devenv.exe dependencies (AB#2359731).
We hoped to fix this by taking the same update (#11038), but that caused functional problems: applications that use MSBuildLocator to build or manipulate projects using the MSBuild API are broken by updates to some dependencies (
System.Memory, as in #7873 (comment), and nowSystem.Threading.Task.Extensions). This means that a straightforward update to those packages breaks all API consumers including users of Roslyn'sMSBuildWorkspace, since theMicrosoft.CodeAnalysis.Workspaces.MSBuild.BuildHost.exeshipped in current versions of Roslyn usesSystem.Threading.Tasks.Extensions4.2.0.1. We backed that out in #11659 to avoid the break.After consulting with a great group of experts (thanks @ericstj, @ViktorHofer, @AArnott!), we arrived at this design:
This means that
MSBuild.exedependency versions match at runtime.MSBuild.exedependency versions are updated.MSBuild.exe.An experimental insertion (Microsoft-internal link) validates that this fixes the
MethodsJittedregression caused when VS updated, causing the mismatch.