From 614c388aea3782756494fa4bd968ffa9b971f63a Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Tue, 7 Apr 2020 21:23:25 +0000 Subject: [PATCH 01/11] Update dependencies from https://github.com/NuGet/NuGet.Client build 5.6.0.6558 - NuGet.Build.Tasks - 5.6.0-preview.3.6558 --- eng/Version.Details.xml | 4 ++-- eng/Versions.props | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index e25593a0e5a8..ba139ca0622f 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -57,9 +57,9 @@ https://github.com/dotnet/aspnetcore-tooling b3ac44798c16fff5b95dbcfe62dea84aa9a1bd72 - + https://github.com/NuGet/NuGet.Client - 1c2681b16a0bb9be9271abe043a1cbf892761ef8 + 863fc6bb184cccfe12caa03bea91b0ddc48843da https://github.com/microsoft/vstest diff --git a/eng/Versions.props b/eng/Versions.props index 6bbbac517f47..384a7d90e1f2 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -39,7 +39,7 @@ - 5.6.0-preview.2.6532 + 5.6.0-preview.3.6558 $(NuGetBuildTasksPackageVersion) $(NuGetBuildTasksPackageVersion) $(NuGetBuildTasksPackageVersion) From 854449a6e99d244b87e8c30d6ab718f82142cdca Mon Sep 17 00:00:00 2001 From: Sarah Oslund Date: Fri, 10 Apr 2020 08:36:08 -0700 Subject: [PATCH 02/11] Updating stage 0 --- global.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/global.json b/global.json index f08276344578..93b2ca56e478 100644 --- a/global.json +++ b/global.json @@ -1,6 +1,6 @@ { "tools": { - "dotnet": "5.0.100-preview.2.20152.7", + "dotnet": "5.0.100-preview.4.20210.2", "runtimes": { "dotnet": [ "$(MicrosoftNETCoreAppRuntimePackageVersion)" From d730ec86dd688c48d2f0120b49b6e487a07b8612 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Thu, 16 Apr 2020 22:06:00 +0000 Subject: [PATCH 03/11] Update dependencies from https://github.com/NuGet/NuGet.Client build 5.7.0.6568 - NuGet.Build.Tasks: 5.6.0-preview.2.6532 -> 5.7.0-preview.1.6568 --- eng/Version.Details.xml | 4 ++-- eng/Versions.props | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index ba139ca0622f..c133c0994fe2 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -57,9 +57,9 @@ https://github.com/dotnet/aspnetcore-tooling b3ac44798c16fff5b95dbcfe62dea84aa9a1bd72 - + https://github.com/NuGet/NuGet.Client - 863fc6bb184cccfe12caa03bea91b0ddc48843da + 818ca73c9d788fa7afe05567d16b0e84dd88edca https://github.com/microsoft/vstest diff --git a/eng/Versions.props b/eng/Versions.props index 384a7d90e1f2..28c0e37a0a04 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -39,7 +39,7 @@ - 5.6.0-preview.3.6558 + 5.7.0-preview.1.6568 $(NuGetBuildTasksPackageVersion) $(NuGetBuildTasksPackageVersion) $(NuGetBuildTasksPackageVersion) From c1bdd718953b650d58fee81cd8d1edf053721294 Mon Sep 17 00:00:00 2001 From: Sarah Oslund Date: Mon, 27 Apr 2020 12:33:48 -0700 Subject: [PATCH 04/11] Update stage 0 --- global.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/global.json b/global.json index 93b2ca56e478..f87adf639981 100644 --- a/global.json +++ b/global.json @@ -1,6 +1,6 @@ { "tools": { - "dotnet": "5.0.100-preview.4.20210.2", + "dotnet": "5.0.100-preview.5.20227.9", "runtimes": { "dotnet": [ "$(MicrosoftNETCoreAppRuntimePackageVersion)" From 333693056ba889afb35bf38e99d16235c206cbf4 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Mon, 27 Apr 2020 21:20:13 +0000 Subject: [PATCH 05/11] Update dependencies from https://github.com/NuGet/NuGet.Client build 5.7.0.6592 - NuGet.Build.Tasks: 5.6.0-preview.2.6532 -> 5.7.0-preview.1.6592 --- eng/Version.Details.xml | 4 ++-- eng/Versions.props | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 944974711fae..03d87bcad3d2 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -57,9 +57,9 @@ https://github.com/dotnet/aspnetcore-tooling 7fa56fb1071c014bad8e471916a0143acb33fd6a - + https://github.com/NuGet/NuGet.Client - 818ca73c9d788fa7afe05567d16b0e84dd88edca + 4dbf16e68eabf507b9f156c801b1b7c3b0586e43 https://github.com/microsoft/vstest diff --git a/eng/Versions.props b/eng/Versions.props index 2c33d4d4e488..1ad63fb9ffb0 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -36,7 +36,7 @@ - 5.7.0-preview.1.6568 + 5.7.0-preview.1.6592 $(NuGetBuildTasksPackageVersion) $(NuGetBuildTasksPackageVersion) $(NuGetBuildTasksPackageVersion) From 3e3b66b17799e4b27d3602189bc4cdb77745d19f Mon Sep 17 00:00:00 2001 From: Sarah Oslund Date: Wed, 29 Apr 2020 07:22:37 -0700 Subject: [PATCH 06/11] Update stage 0 --- global.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/global.json b/global.json index f87adf639981..f329b31f0294 100644 --- a/global.json +++ b/global.json @@ -1,6 +1,6 @@ { "tools": { - "dotnet": "5.0.100-preview.5.20227.9", + "dotnet": "5.0.100-preview.5.20228.8", "runtimes": { "dotnet": [ "$(MicrosoftNETCoreAppRuntimePackageVersion)" From d893d66d23e6c244e38026981eb51871fa701dad Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Fri, 8 May 2020 12:10:00 +0000 Subject: [PATCH 07/11] Update dependencies from https://github.com/NuGet/NuGet.Client build 5.7.0.6609 - NuGet.Build.Tasks: 5.6.0-preview.2.6532 -> 5.7.0-preview.1.6609 --- eng/Version.Details.xml | 4 ++-- eng/Versions.props | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 03d87bcad3d2..38329d05459f 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -57,9 +57,9 @@ https://github.com/dotnet/aspnetcore-tooling 7fa56fb1071c014bad8e471916a0143acb33fd6a - + https://github.com/NuGet/NuGet.Client - 4dbf16e68eabf507b9f156c801b1b7c3b0586e43 + 12a375a8a02764b772a20371abaf797639a7f961 https://github.com/microsoft/vstest diff --git a/eng/Versions.props b/eng/Versions.props index 1ad63fb9ffb0..35bd0eb5649a 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -36,7 +36,7 @@ - 5.7.0-preview.1.6592 + 5.7.0-preview.1.6609 $(NuGetBuildTasksPackageVersion) $(NuGetBuildTasksPackageVersion) $(NuGetBuildTasksPackageVersion) From 952394572636884c88ca5b2adb0f335d0fb5d49e Mon Sep 17 00:00:00 2001 From: Daniel Plaisted Date: Fri, 8 May 2020 09:19:55 -0700 Subject: [PATCH 08/11] Update stage 0 --- global.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/global.json b/global.json index f329b31f0294..295999e81ecb 100644 --- a/global.json +++ b/global.json @@ -1,6 +1,6 @@ { "tools": { - "dotnet": "5.0.100-preview.5.20228.8", + "dotnet": "5.0.100-preview.5.20258.4", "runtimes": { "dotnet": [ "$(MicrosoftNETCoreAppRuntimePackageVersion)" From 16eaa8f8b87a40e07b2322b554c98a4eb53abaa8 Mon Sep 17 00:00:00 2001 From: Daniel Plaisted Date: Fri, 8 May 2020 17:44:59 -0700 Subject: [PATCH 09/11] Use different test directories for test Hopefully this will fix flaky failures for this test --- src/Tests/dotnet-restore.Tests/GivenThatIWantToRestoreApp.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Tests/dotnet-restore.Tests/GivenThatIWantToRestoreApp.cs b/src/Tests/dotnet-restore.Tests/GivenThatIWantToRestoreApp.cs index e27bfea922b5..56c922ee6df3 100644 --- a/src/Tests/dotnet-restore.Tests/GivenThatIWantToRestoreApp.cs +++ b/src/Tests/dotnet-restore.Tests/GivenThatIWantToRestoreApp.cs @@ -56,7 +56,7 @@ public void ItRestoresAppToSpecificDirectory(bool useStaticGraphEvaluation) [InlineData(false)] public void ItRestoresLibToSpecificDirectory(bool useStaticGraphEvaluation) { - var rootPath = _testAssetsManager.CreateTestDirectory().Path; + var rootPath = _testAssetsManager.CreateTestDirectory(identifier: useStaticGraphEvaluation.ToString()).Path; string dir = "pkgs"; string fullPath = Path.GetFullPath(Path.Combine(rootPath, dir)); From 15742b6387f5c7f5369fad755150772d8a453e00 Mon Sep 17 00:00:00 2001 From: Daniel Plaisted Date: Mon, 11 May 2020 17:25:59 -0700 Subject: [PATCH 10/11] Add logging for assets file contents if assertion fails --- .../GivenThatIWantToRestoreApp.cs | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) 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] From 32b1c75b988d5d288923fcaebd2a740ad593a781 Mon Sep 17 00:00:00 2001 From: Daniel Plaisted Date: Tue, 12 May 2020 10:16:22 -0700 Subject: [PATCH 11/11] Fix test to explicitly reference package Classlib template now targets .NET 5 which doesn't require any implicit package references --- .../GivenThatIWantToRestoreApp.cs | 21 ++++++++++++------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/src/Tests/dotnet-restore.Tests/GivenThatIWantToRestoreApp.cs b/src/Tests/dotnet-restore.Tests/GivenThatIWantToRestoreApp.cs index 57b6b41473db..e2f228909f7a 100644 --- a/src/Tests/dotnet-restore.Tests/GivenThatIWantToRestoreApp.cs +++ b/src/Tests/dotnet-restore.Tests/GivenThatIWantToRestoreApp.cs @@ -13,6 +13,7 @@ using Microsoft.NET.TestFramework.Assertions; using Microsoft.NET.TestFramework.Commands; using Xunit.Abstractions; +using Microsoft.NET.TestFramework.ProjectConstruction; namespace Microsoft.DotNet.Restore.Test { @@ -56,18 +57,22 @@ public void ItRestoresAppToSpecificDirectory(bool useStaticGraphEvaluation) [InlineData(false)] public void ItRestoresLibToSpecificDirectory(bool useStaticGraphEvaluation) { - var rootPath = _testAssetsManager.CreateTestDirectory(identifier: useStaticGraphEvaluation.ToString()).Path; + var testProject = new TestProject() + { + Name = "RestoreToDir", + TargetFrameworks = "net5.0", + IsSdkProject = true, + }; + + testProject.PackageReferences.Add(new TestPackageReference("Newtonsoft.Json", "12.0.3")); + + var testAsset = _testAssetsManager.CreateTestProject(testProject, identifier: useStaticGraphEvaluation.ToString()); + + var rootPath = Path.Combine(testAsset.TestRoot, testProject.Name); string dir = "pkgs"; string fullPath = Path.GetFullPath(Path.Combine(rootPath, dir)); - string [] newArgs = new[] { "classlib", "-o", rootPath, "--no-restore" }; - new DotnetCommand(Log, "new") - .WithWorkingDirectory(rootPath) - .Execute(newArgs) - .Should() - .Pass(); - string[] args = new[] { "--packages", dir }; args = HandleStaticGraphEvaluation(useStaticGraphEvaluation, args); new DotnetRestoreCommand(Log)