Skip to content

Commit f436c2d

Browse files
committed
Make tests pass
For ItDoesntCreateReferenceAssembliesWhenNoCompilationOptions, the issue is that the RuntimeLibraries are minimized to remove libraries with no assets and no (transitive) dependencies with assets. This removes all but one of the RuntimeLibraries, the one remaining being the main project. Per dsplaisted's suggestion, I then removed "Dependencies" that are absent from Libraries, which means removing all of its dependencies, so RuntimeLibraries should now have only one entry, and it should have no dependencies, hence the shift.
1 parent 181689f commit f436c2d

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

src/Tasks/Microsoft.NET.Build.Tasks.UnitTests/GivenADependencyContextBuilder.cs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -185,11 +185,7 @@ public void ItDoesntCreateReferenceAssembliesWhenNoCompilationOptions()
185185
.RuntimeLibraries
186186
.SelectMany(l => l.Dependencies)
187187
.Should()
188-
.NotBeEmpty()
189-
.And
190-
.NotContain(d => d.Name == "System.NotConflicting")
191-
.And
192-
.NotContain(d => d.Name == "System.Collections.NonGeneric.Reference");
188+
.BeEmpty();
193189
}
194190

195191
[Fact]

src/Tasks/Microsoft.NET.Build.Tasks/DependencyContextBuilder.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -494,7 +494,8 @@ public DependencyContext Build(string[] userRuntimeAssemblies = null)
494494
compilationLibraries.Any(lib => lib.Name.Equals(dependency.Name))).ToList(),
495495
library.Library.Serviceable,
496496
library.Library.Path,
497-
library.Library.HashPath)),
497+
library.Library.HashPath,
498+
library.Library.RuntimeStoreManifestName)),
498499
runtimeFallbackGraph);
499500
}
500501

0 commit comments

Comments
 (0)