From 7f4f35db658d7cffce5a4533ba7b697d7ab4d2bb Mon Sep 17 00:00:00 2001 From: Livar Cunha Date: Thu, 23 Feb 2017 01:13:58 -0800 Subject: [PATCH 1/2] Adding the SDK version to the hash of the lzma archive, since the SDK has implicit package refs in it that will impact the archive when they change. --- build/Microsoft.DotNet.Cli.DependencyVersions.props | 2 +- build/compile/Microsoft.DotNet.Cli.LzmaArchive.targets | 2 +- .../dotnet-cli-build/GenerateNuGetPackagesArchiveVersion.cs | 5 +++++ 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/build/Microsoft.DotNet.Cli.DependencyVersions.props b/build/Microsoft.DotNet.Cli.DependencyVersions.props index b0fb69426..7ee04374d 100644 --- a/build/Microsoft.DotNet.Cli.DependencyVersions.props +++ b/build/Microsoft.DotNet.Cli.DependencyVersions.props @@ -4,7 +4,7 @@ 1.1.1 15.1.548 2.0.0-rc4-61325-08 - 1.0.0-alpha-20170217-2 + 1.0.0-alpha-20170222-1 4.0.0-rtm-2283 1.0.0-alpha-20170130-3-281 15.0.0-preview-20170222-09 diff --git a/build/compile/Microsoft.DotNet.Cli.LzmaArchive.targets b/build/compile/Microsoft.DotNet.Cli.LzmaArchive.targets index 7dc602f21..c251348f1 100644 --- a/build/compile/Microsoft.DotNet.Cli.LzmaArchive.targets +++ b/build/compile/Microsoft.DotNet.Cli.LzmaArchive.targets @@ -120,7 +120,7 @@ - + diff --git a/build_projects/dotnet-cli-build/GenerateNuGetPackagesArchiveVersion.cs b/build_projects/dotnet-cli-build/GenerateNuGetPackagesArchiveVersion.cs index 64e789214..4c7705265 100644 --- a/build_projects/dotnet-cli-build/GenerateNuGetPackagesArchiveVersion.cs +++ b/build_projects/dotnet-cli-build/GenerateNuGetPackagesArchiveVersion.cs @@ -18,6 +18,9 @@ namespace Microsoft.DotNet.Cli.Build { } + [Required] + public string SDKVersion { get; set; } + [Required] public string ToolPath { get; set; } @@ -70,6 +73,8 @@ namespace Microsoft.DotNet.Cli.Build Directory.Delete(targetDir, true); } + dataToHash += SDKVersion; + Log.LogMessage($"NuGet Packages Archive Data To Hash: '{dataToHash}'"); var sha256 = SHA256.Create(); From db2c5378cb99e649ea203e846b26917301f2258c Mon Sep 17 00:00:00 2001 From: Unknown Date: Thu, 23 Feb 2017 17:57:32 -0800 Subject: [PATCH 2/2] Remove runtime specification in favor of implicit runtime --- .../GivenAProjectDependenciesCommandFactory.cs | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/test/Microsoft.DotNet.Cli.Utils.Tests/GivenAProjectDependenciesCommandFactory.cs b/test/Microsoft.DotNet.Cli.Utils.Tests/GivenAProjectDependenciesCommandFactory.cs index ba8194a21..84578fde6 100644 --- a/test/Microsoft.DotNet.Cli.Utils.Tests/GivenAProjectDependenciesCommandFactory.cs +++ b/test/Microsoft.DotNet.Cli.Utils.Tests/GivenAProjectDependenciesCommandFactory.cs @@ -28,7 +28,6 @@ namespace Microsoft.DotNet.Cli.Utils.Tests [WindowsOnlyFact] public void It_resolves_desktop_apps_defaulting_to_Debug_Configuration() { - var runtime = DotnetLegacyRuntimeIdentifiers.InferLegacyRestoreRuntimeIdentifier(); var configuration = "Debug"; var testInstance = TestAssets.Get(TestAssetKinds.DesktopTestProjects, "AppWithProjTool2Fx") @@ -38,14 +37,12 @@ namespace Microsoft.DotNet.Cli.Utils.Tests var restoreCommand = new RestoreCommand() .WithWorkingDirectory(testInstance.Root) - .WithRuntime(runtime) .ExecuteWithCapturedOutput() .Should().Pass(); var buildCommand = new BuildCommand() .WithWorkingDirectory(testInstance.Root) .WithConfiguration(configuration) - .WithRuntime(runtime) .WithCapturedOutput() .Execute() .Should().Pass(); @@ -67,7 +64,6 @@ namespace Microsoft.DotNet.Cli.Utils.Tests [WindowsOnlyFact] public void It_resolves_desktop_apps_when_configuration_is_Debug() { - var runtime = DotnetLegacyRuntimeIdentifiers.InferLegacyRestoreRuntimeIdentifier(); var configuration = "Debug"; var testInstance = TestAssets.Get(TestAssetKinds.DesktopTestProjects, "AppWithProjTool2Fx") @@ -77,14 +73,12 @@ namespace Microsoft.DotNet.Cli.Utils.Tests var restoreCommand = new RestoreCommand() .WithWorkingDirectory(testInstance.Root) - .WithRuntime(runtime) .ExecuteWithCapturedOutput() .Should().Pass(); var buildCommand = new BuildCommand() .WithWorkingDirectory(testInstance.Root) .WithConfiguration(configuration) - .WithRuntime(runtime) .Execute() .Should().Pass(); @@ -104,7 +98,6 @@ namespace Microsoft.DotNet.Cli.Utils.Tests [WindowsOnlyFact] public void It_resolves_desktop_apps_when_configuration_is_Release() { - var runtime = DotnetLegacyRuntimeIdentifiers.InferLegacyRestoreRuntimeIdentifier(); var configuration = "Debug"; var testInstance = TestAssets.Get(TestAssetKinds.DesktopTestProjects, "AppWithProjTool2Fx") @@ -114,14 +107,12 @@ namespace Microsoft.DotNet.Cli.Utils.Tests var restoreCommand = new RestoreCommand() .WithWorkingDirectory(testInstance.Root) - .WithRuntime(runtime) .ExecuteWithCapturedOutput() .Should().Pass(); var buildCommand = new BuildCommand() .WithWorkingDirectory(testInstance.Root) .WithConfiguration(configuration) - .WithRuntime(runtime) .WithCapturedOutput() .Execute() .Should().Pass(); @@ -143,7 +134,6 @@ namespace Microsoft.DotNet.Cli.Utils.Tests [WindowsOnlyFact] public void It_resolves_desktop_apps_using_configuration_passed_to_create() { - var runtime = DotnetLegacyRuntimeIdentifiers.InferLegacyRestoreRuntimeIdentifier(); var configuration = "Debug"; var testInstance = TestAssets.Get(TestAssetKinds.DesktopTestProjects, "AppWithProjTool2Fx") @@ -153,14 +143,12 @@ namespace Microsoft.DotNet.Cli.Utils.Tests var restoreCommand = new RestoreCommand() .WithWorkingDirectory(testInstance.Root) - .WithRuntime(runtime) .ExecuteWithCapturedOutput() .Should().Pass(); var buildCommand = new BuildCommand() .WithWorkingDirectory(testInstance.Root) .WithConfiguration(configuration) - .WithRuntime(runtime) .WithCapturedOutput() .Execute() .Should().Pass();