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

Check csproj files for adjacent packages.config. #10803

Merged
merged 8 commits into from
Oct 17, 2024

Conversation

sebasgomez238
Copy link
Contributor

@sebasgomez238 sebasgomez238 commented Oct 16, 2024

Although the nuget updater was properly running the code to update packages.config files, the file_fetcher.rb was only reporting the packages.config in the directory where the job started.

This PR adds logic to:

  1. Look for packages.config files adjacent to imported project files.
  2. Modifies the fetch_imported_property_files method to improve fetching imported files.

The reason for the second change is that when for example projectA.csproj has references to both projectB.csproj and projectC.csproj then the imported project files was incorrectly reporting ONLY projectC.csproj.

All feedback is welcome.

@github-actions github-actions bot added the L: dotnet:nuget NuGet packages via nuget or dotnet label Oct 16, 2024
@sebasgomez238 sebasgomez238 changed the title Check csprojs for adjacent packages.config. + fix csproj fetching for… Check csproj files for adjacent packages.config. + fix csproj fetching for… Oct 16, 2024
@sebasgomez238 sebasgomez238 changed the title Check csproj files for adjacent packages.config. + fix csproj fetching for… Check csproj files for adjacent packages.config. Oct 16, 2024
@brettfo
Copy link
Contributor

brettfo commented Oct 16, 2024

Add the following to nuget/.gitignore and you can remove the bin and obj directories that were added.

 /.bundle/
 !.bundle/config
 /.env
 /tmp
 /dependabot-*.gem
 Properties/
+bin/
+obj/

@sebasgomez238 sebasgomez238 marked this pull request as ready for review October 17, 2024 14:47
@sebasgomez238 sebasgomez238 requested a review from a team as a code owner October 17, 2024 14:47
@randhircs randhircs force-pushed the users/segomez/fix-packages-config-bug branch from 52caa95 to db6a801 Compare October 17, 2024 22:40
@randhircs randhircs merged commit 22dc8cb into main Oct 17, 2024
68 checks passed
@randhircs randhircs deleted the users/segomez/fix-packages-config-bug branch October 17, 2024 23:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
L: dotnet:nuget NuGet packages via nuget or dotnet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants