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

Improvements to the patching of dependencies for the dotnet.exe tests, don't overwrite higher versions of assemblies #5054

Merged
merged 3 commits into from
Feb 16, 2023

Conversation

nkolev92
Copy link
Member

@nkolev92 nkolev92 commented Feb 15, 2023

Bug

Fixes: https://github.com/NuGet/Client.Engineering/issues/2157

Regression? Last working version:

Description

When the new version of the .NET SDK shipped yesterday, it broke some of our tests as our infrastructure started downloading 7.0.200 instead of 7.0.1xx SDK it used.

The correct behavior is to test against newer versions, so we need fix our tests to work with that.
This is a multi-fix PR;

PR Checklist

  • PR has a meaningful title

  • PR has a linked issue.

  • Described changes

  • Tests

    • Automated tests added
    • OR
    • Test exception
    • OR
    • N/A
  • Documentation

    • Documentation PR or issue filled
    • OR
    • N/A

@nkolev92 nkolev92 marked this pull request as ready for review February 15, 2023 22:33
@nkolev92 nkolev92 requested a review from a team as a code owner February 15, 2023 22:33
donnie-msft
donnie-msft previously approved these changes Feb 15, 2023
if (fileToPatchVersion > targetFileVersion)
{
file.CopyTo(dependencyTargetPath, overwrite: true);
}
Copy link
Contributor

Choose a reason for hiding this comment

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

So the else isn't needed because, this means we can use whatever is in the SDK without needed to copy to the target path (right?)

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, because the version in the SDK is higher than what we're referencing for compilation.

erdembayar
erdembayar previously approved these changes Feb 15, 2023
@nkolev92 nkolev92 merged commit 39a957e into dev Feb 16, 2023
@nkolev92 nkolev92 deleted the dev-nkolev92-makeCLIpatchingWorkWith70200 branch February 16, 2023 22:42
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.

5 participants