PackageReferenceProcessor - Apply filtering for custom NuGet packages also on dependencies#141
Merged
Conversation
… also on dependencies
This was referenced Mar 6, 2026
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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:
CreatePackageAssemblyReferencemethod to encapsulate the logic for creatingPackageAssemblyReferenceobjects and determining whether a package should be installed, reducing code duplication and improving maintainability.Dependency filtering improvements:
ProcessRemainingPackagesAsyncto skip development dependency packages only if they are also present in thedefaultIncludedFilesNuGetPackagescollection, ensuring more accurate dependency handling.Method signature updates:
ProcessRemainingPackagesAsyncto acceptdefaultIncludedFilesNuGetPackagesas an argument, enabling improved dependency filtering and handling.ProcessRemainingPackagesAsyncinProcessPackagesAsyncto pass the new argument, maintaining compatibility with the updated method signature.Assembly reference handling:
ProcessResolvedPackagesAsyncandProcessRemainingPackagesAsyncto use the newCreatePackageAssemblyReferencemethod, ensuring consistent and centralized handling of assembly reference creation and installation decisions