Skip to content

Commit 322e007

Browse files
committed
Also skip trimming "xunit" from deps.json
1 parent e09f0c8 commit 322e007

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -371,9 +371,10 @@ public DependencyContext Build(string[] userRuntimeAssemblies = null)
371371
var lib = unprocessedLibraries.First();
372372
unprocessedLibraries.Remove(lib);
373373

374-
if (lib.Library.Name.Equals("xunit.core", StringComparison.OrdinalIgnoreCase))
374+
if (lib.Library.Name.Equals("xunit", StringComparison.OrdinalIgnoreCase) ||
375+
lib.Library.Name.Equals("xunit.core", StringComparison.OrdinalIgnoreCase))
375376
{
376-
// Special case xunit.core, it should not be removed because the xUnit v2 runner looks for this library in the deps.json to
377+
// Special case xunit and xunit.core, they should not be removed because the xUnit v2 runner looks for these libraries in the deps.json to
377378
// identify test projects.
378379
// See https://github.com/dotnet/sdk/issues/49248
379380
continue;

0 commit comments

Comments
 (0)