diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 6034e132ff02..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 - 1c2681b16a0bb9be9271abe043a1cbf892761ef8 + 12a375a8a02764b772a20371abaf797639a7f961 https://github.com/microsoft/vstest diff --git a/eng/Versions.props b/eng/Versions.props index 632dbda7c280..35bd0eb5649a 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -36,7 +36,7 @@ - 5.6.0-preview.2.6532 + 5.7.0-preview.1.6609 $(NuGetBuildTasksPackageVersion) $(NuGetBuildTasksPackageVersion) $(NuGetBuildTasksPackageVersion) diff --git a/global.json b/global.json index f08276344578..295999e81ecb 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.5.20258.4", "runtimes": { "dotnet": [ "$(MicrosoftNETCoreAppRuntimePackageVersion)" diff --git a/src/Tests/dotnet-restore.Tests/GivenThatIWantToRestoreApp.cs b/src/Tests/dotnet-restore.Tests/GivenThatIWantToRestoreApp.cs index e27bfea922b5..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().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) @@ -77,8 +82,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]