diff --git a/src/Tests/dotnet-restore.Tests/GivenThatIWantToRestoreApp.cs b/src/Tests/dotnet-restore.Tests/GivenThatIWantToRestoreApp.cs index 56c922ee6df3..57b6b41473db 100644 --- a/src/Tests/dotnet-restore.Tests/GivenThatIWantToRestoreApp.cs +++ b/src/Tests/dotnet-restore.Tests/GivenThatIWantToRestoreApp.cs @@ -77,8 +77,21 @@ public void ItRestoresLibToSpecificDirectory(bool useStaticGraphEvaluation) .Pass() .And.NotHaveStdErr(); + var dllCount = 0; + + if (Directory.Exists(fullPath)) + { + dllCount = Directory.EnumerateFiles(fullPath, "*.dll", SearchOption.AllDirectories).Count(); + } + + if (dllCount == 0) + { + Log.WriteLine("Assets file contents:"); + Log.WriteLine(File.ReadAllText(Path.Combine(rootPath, "obj", "project.assets.json"))); + } + Directory.Exists(fullPath).Should().BeTrue(); - Directory.EnumerateFiles(fullPath, "*.dll", SearchOption.AllDirectories).Count().Should().BeGreaterThan(0); + dllCount.Should().BeGreaterThan(0); } [Theory]