File tree Expand file tree Collapse file tree 1 file changed +9
-10
lines changed
src/Tasks/Microsoft.NET.Build.Tasks Expand file tree Collapse file tree 1 file changed +9
-10
lines changed Original file line number Diff line number Diff line change @@ -829,18 +829,17 @@ private void CalculateExcludedLibraries()
829
829
while ( dependencyListToWalk . Count != 0 )
830
830
{
831
831
var dependencyName = dependencyListToWalk . Pop ( ) ;
832
- if ( ! includedDependencies . ContainsKey ( dependencyName ) && _excludeFromPublishPackageIds ? . Contains ( dependencyName ) != true )
832
+ // There may not be a library in the assets file if a referenced project has
833
+ // PrivateAssets="all" for a package reference, and there is a package in the graph
834
+ // that depends on the same package.
835
+ if ( ! includedDependencies . ContainsKey ( dependencyName ) &&
836
+ _excludeFromPublishPackageIds ? . Contains ( dependencyName ) != true &&
837
+ _dependencyLibraries . TryGetValue ( dependencyName , out var dependencyLibrary ) )
833
838
{
834
- // There may not be a library in the assets file if a referenced project has
835
- // PrivateAssets="all" for a package reference, and there is a package in the graph
836
- // that depends on the same package.
837
- if ( _dependencyLibraries . TryGetValue ( dependencyName , out var dependencyLibrary ) )
839
+ includedDependencies . Add ( dependencyName , dependencyLibrary ) ;
840
+ foreach ( var newDependency in _libraryDependencies [ dependencyName ] )
838
841
{
839
- includedDependencies . Add ( dependencyName , dependencyLibrary ) ;
840
- foreach ( var newDependency in _libraryDependencies [ dependencyName ] )
841
- {
842
- dependencyListToWalk . Push ( newDependency . Name ) ;
843
- }
842
+ dependencyListToWalk . Push ( newDependency . Name ) ;
844
843
}
845
844
}
846
845
}
You can’t perform that action at this time.
0 commit comments