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

Fix issue with solution filters not restoring when in different folder than referenced solution #5197

Merged
merged 3 commits into from
Jun 16, 2023
Merged

Fix issue with solution filters not restoring when in different folder than referenced solution #5197

merged 3 commits into from
Jun 16, 2023

Conversation

jerhon
Copy link
Contributor

@jerhon jerhon commented Jun 2, 2023

Bug

Fixes: NuGet/Home#12562

Regression? Last working version: n/a

Description

This is a bug fix that allows restoration of nuget packages for solution filters in directories other than the referenced solution file. A repo of the issue can be found in this Git repository: https://github.com/jerhon/nuget-slnf-bug

This changes the paths used to restore projects to be determined by the AbsolutePath reported by the MSBuild SDK on the ProjectFile rather than doing path math on the directory of the passed in file and the relative path reported by MSBuild.

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

@jerhon jerhon requested a review from a team as a code owner June 2, 2023 00:41
@ghost ghost added the Community PRs created by someone not in the NuGet team label Jun 2, 2023
@jerhon jerhon changed the title Jerhon slnf relative path fix Fix issue with solution filters not restoring when in different folder than referenced solution Jun 2, 2023
@jerhon
Copy link
Contributor Author

jerhon commented Jun 2, 2023

@dotnet-policy-service agree company="NAU Country Insurance"

@ghost ghost added the Status:No recent activity PRs that have not had any recent activity and will be closed if the label is not removed label Jun 12, 2023
@ghost
Copy link

ghost commented Jun 12, 2023

This PR has been automatically marked as stale because it has no activity for 7 days. It will be closed if no further activity occurs within another 90 days of this comment. If it is closed, you may reopen it anytime when you're ready again, as long as you don't delete the branch.

@jerhon
Copy link
Contributor Author

jerhon commented Jun 14, 2023

Anything else I need to do to move forward on this fix? I see some unit tests failed, anything I can do about those? The links to the failures take me to a private Azure DevOps instance.

@ghost ghost removed the Status:No recent activity PRs that have not had any recent activity and will be closed if the label is not removed label Jun 14, 2023
@donnie-msft donnie-msft self-assigned this Jun 15, 2023
@donnie-msft
Copy link
Contributor

@jerhon I'll help take a look at the failing tests, but first could you rebase your branch? It may be due to some CI issue we fixed since your last rebase. Thanks!

@jerhon
Copy link
Contributor Author

jerhon commented Jun 15, 2023

@donnie-msft Done.

Copy link
Contributor

@donnie-msft donnie-msft left a comment

Choose a reason for hiding this comment

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

Thanks for your contribution! 🚀

@donnie-msft donnie-msft merged commit 7c2264f into NuGet:dev Jun 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Community PRs created by someone not in the NuGet team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

nuget restore fails for solution filters not in same directory as the solution it references.
3 participants