Skip to content

PackageReferenceProcessor - Apply filtering for custom NuGet packages also on dependencies#141

Merged
MichielOda merged 1 commit into
mainfrom
FixDependencies
Mar 6, 2026
Merged

PackageReferenceProcessor - Apply filtering for custom NuGet packages also on dependencies#141
MichielOda merged 1 commit into
mainfrom
FixDependencies

Conversation

@MichielOda
Copy link
Copy Markdown
Member

This pull request introduces refactoring and improvements to how NuGet package assembly references are processed and handled, especially regarding dependency filtering and the creation of assembly references. The most important changes include the extraction of assembly reference logic into a dedicated method, improved handling of default-included file NuGet packages, and updates to method signatures to support these enhancements.

Refactoring and logic extraction:

  • Added a new CreatePackageAssemblyReference method to encapsulate the logic for creating PackageAssemblyReference objects and determining whether a package should be installed, reducing code duplication and improving maintainability.

Dependency filtering improvements:

  • Updated the filtering logic in ProcessRemainingPackagesAsync to skip development dependency packages only if they are also present in the defaultIncludedFilesNuGetPackages collection, ensuring more accurate dependency handling.

Method signature updates:

  • Modified the signature of ProcessRemainingPackagesAsync to accept defaultIncludedFilesNuGetPackages as an argument, enabling improved dependency filtering and handling.
  • Updated the call to ProcessRemainingPackagesAsync in ProcessPackagesAsync to pass the new argument, maintaining compatibility with the updated method signature.

Assembly reference handling:

  • Changed the logic in ProcessResolvedPackagesAsync and ProcessRemainingPackagesAsync to use the new CreatePackageAssemblyReference method, ensuring consistent and centralized handling of assembly reference creation and installation decisions

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.

Transitive devpacks are being added as NuGets into our scripts, which breaks the functionality

1 participant