Skip to content
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

Revert "Loosen version comparisons in loading assemblies (#7042)" #7415

Merged
merged 2 commits into from
Feb 24, 2022

Conversation

rainersigwald
Copy link
Member

@rainersigwald rainersigwald commented Feb 24, 2022

This reverts commit 3bb10b7.

Fixes dotnet/sdk#23498

Work item (Internal use):

Summary

The linked commit changed MSBuild Assembly resolution to be in line with .NET Assembly resolution, but this had adverse impact on an SDK scenario that led to the wrong version of certain pre-packaged DLLs being loaded compared to previous versions of the runtime. In this case, System.Security.Cryptography.ProtectedData triggered the incorrect loading behavior.

Customer Impact

Restore operations that use NuGet feeds with encrypted passwords began failing. There are workarounds like saving the passwords in cleartext, but this is not an ideal workaround.

Regression?

This regressed behavior from 6.0.1xx and earlier series SDKs.

Testing

We still need to work with impacted customers to verify that this change fixes the underlying issue, but investigations point to yes.

Risk

Per @rainersigwald this is low risk. It was a nice-to-have that addressed a couple annoying issues, but we can regroup and take another pass at it for a later release.

@baronfel baronfel self-requested a review February 24, 2022 17:37
Copy link
Member

@baronfel baronfel left a comment

Choose a reason for hiding this comment

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

Blocking until we get verification from impacted customers.

@baronfel
Copy link
Member

I was able to reproduce the root issue and use the dlls built from this PR to validate the flow.

@rbhanda rbhanda added this to the 6.0.4 milestone Feb 24, 2022
@jharjung
Copy link

Just FYI, this broke my custom build tasks when a team member updated VS to 17.3.1 which installed the .net 6.0.4 sdk.

Build was fixed by updating nuget packages for Microsoft.Build.* and Microsoft.CodeAnalysis.*. But updating Microsoft.Build.Locator to 1.5.3 ran into this issue: microsoft/MSBuildLocator#176

This was a rather annoying situation to be in. .net 6.0.4 changed the assembly load behavior, which breaks the build, so I have to update nuget packages, but the updated nuget packages have bugs that break that build.

This is most definitely not the first time that changes were made to MSBuild and shipped with minor point releases that ended up breaking my build. I basically have to forbid everyone on my team from ever updating Visual Studio unless/until I give them the go ahead. Otherwise, inevitably, someone will update and not be able to build and I'll have to drop what I'm doing and spend two days researching and resolving obscure issues.

Maybe we could be more conscious of this and try to not have so many breaking changes in MSBuild in minor version .net / VS releases?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants