From 09d811fdbd54a53932049705c1b036209b317bc1 Mon Sep 17 00:00:00 2001 From: Livar Cunha Date: Sat, 8 Oct 2016 11:45:19 -0700 Subject: [PATCH 1/2] Adding an OverrideRid property used in the GetRuntimeInfo task to override the rid of the CLI. This allows us to build for osx.10.11 when building on osx.10.12. --- build/Microsoft.DotNet.Cli.Prepare.targets | 2 +- .../GetCurrentRuntimeInformation.cs | 4 +++- .../DotnetRuntimeIdentifiers.cs | 19 +++++++++++++++++++ .../Properties/AssemblyInfo.cs | 6 ++++++ test/EndToEnd/EndToEndTest.cs | 3 ++- test/EndToEnd/project.json | 1 + .../GivenAProjectDependencyCommandResolver.cs | 7 ++++--- .../StreamForwarderTests.cs | 2 +- .../project.json | 8 ++++++-- .../Commands/PublishCommand.cs | 4 +++- ...boutScriptVariablesFromAManagedCompiler.cs | 4 ++-- test/dotnet-compile.UnitTests/project.json | 8 ++++++-- .../PublishDesktopTests.cs | 5 ++++- test/dotnet-publish.Tests/PublishTests.cs | 10 +++++++--- test/dotnet-publish.Tests/project.json | 14 ++++++++++++++ .../GivenDotnetPublish3PublishesProjects.cs | 2 +- test/dotnet-publish3.Tests/project.json | 11 +++++++++++ test/dotnet-run.UnitTests/project.json | 10 ++++++++++ test/dotnet.Tests/PackagedCommandTests.cs | 4 ++-- 19 files changed, 103 insertions(+), 21 deletions(-) diff --git a/build/Microsoft.DotNet.Cli.Prepare.targets b/build/Microsoft.DotNet.Cli.Prepare.targets index 1cc6e9468..d5311419d 100644 --- a/build/Microsoft.DotNet.Cli.Prepare.targets +++ b/build/Microsoft.DotNet.Cli.Prepare.targets @@ -16,7 +16,7 @@ DependsOnTargets="BuildDotnetCliBuildFramework" > - + diff --git a/build_projects/dotnet-cli-build/GetCurrentRuntimeInformation.cs b/build_projects/dotnet-cli-build/GetCurrentRuntimeInformation.cs index dbbeaa0de..76e10d8ab 100644 --- a/build_projects/dotnet-cli-build/GetCurrentRuntimeInformation.cs +++ b/build_projects/dotnet-cli-build/GetCurrentRuntimeInformation.cs @@ -9,6 +9,8 @@ namespace Microsoft.DotNet.Cli.Build { public class GetCurrentRuntimeInformation : Task { + public string OverrideRid { get; set; } + [Output] public string Rid { get; set; } @@ -20,7 +22,7 @@ namespace Microsoft.DotNet.Cli.Build public override bool Execute() { - Rid = RuntimeEnvironment.GetRuntimeIdentifier(); + Rid = string.IsNullOrEmpty(OverrideRid) ? RuntimeEnvironment.GetRuntimeIdentifier() : OverrideRid; Architecture = RuntimeEnvironment.RuntimeArchitecture; OSName = Monikers.GetOSShortName(); diff --git a/src/Microsoft.DotNet.Cli.Utils/DotnetRuntimeIdentifiers.cs b/src/Microsoft.DotNet.Cli.Utils/DotnetRuntimeIdentifiers.cs index 7f3da4c22..b908c5d4b 100644 --- a/src/Microsoft.DotNet.Cli.Utils/DotnetRuntimeIdentifiers.cs +++ b/src/Microsoft.DotNet.Cli.Utils/DotnetRuntimeIdentifiers.cs @@ -3,6 +3,7 @@ using System.Collections.Generic; using Microsoft.DotNet.InternalAbstractions; +using Microsoft.DotNet.PlatformAbstractions; namespace Microsoft.DotNet.Cli.Utils { @@ -31,5 +32,23 @@ namespace Microsoft.DotNet.Cli.Utils return RuntimeEnvironmentRidExtensions.GetAllCandidateRuntimeIdentifiers(fallbackIdentifiers); } + + // Gets the identfier that is used for restore by default (this is different from the actual RID, but only on Windows) + public static string InferLegacyRestoreRuntimeIdentifier() + { + if (RuntimeEnvironment.OperatingSystemPlatform != Platform.Windows) + { + FrameworkDependencyFile fxDepsFile = new FrameworkDependencyFile(); + return fxDepsFile.SupportsCurrentRuntime() ? + RuntimeEnvironment.GetRuntimeIdentifier() : + DotnetFiles.VersionFileObject.BuildRid; + + } + else + { + var arch = RuntimeEnvironment.RuntimeArchitecture.ToLowerInvariant(); + return "win7-" + arch; + } + } } } diff --git a/src/Microsoft.DotNet.Cli.Utils/Properties/AssemblyInfo.cs b/src/Microsoft.DotNet.Cli.Utils/Properties/AssemblyInfo.cs index e63bf1ff6..840b2d5c8 100644 --- a/src/Microsoft.DotNet.Cli.Utils/Properties/AssemblyInfo.cs +++ b/src/Microsoft.DotNet.Cli.Utils/Properties/AssemblyInfo.cs @@ -5,3 +5,9 @@ using System.Runtime.CompilerServices; [assembly: InternalsVisibleTo("dotnet, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")] [assembly: InternalsVisibleTo("Microsoft.DotNet.Tools.Test, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")] [assembly: InternalsVisibleTo("Microsoft.DotNet.Cli.Utils.Tests, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")] +[assembly: InternalsVisibleTo("dotnet-compile.UnitTests, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")] +[assembly: InternalsVisibleTo("dotnet-publish.Tests, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")] +[assembly: InternalsVisibleTo("dotnet.Tests, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")] +[assembly: InternalsVisibleTo("EndToEnd, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")] +[assembly: InternalsVisibleTo("Microsoft.DotNet.Tools.Tests.Utilities, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")] +[assembly: InternalsVisibleTo("dotnet-publish3.Tests, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")] diff --git a/test/EndToEnd/EndToEndTest.cs b/test/EndToEnd/EndToEndTest.cs index 99c3bb9a9..d62a6966c 100644 --- a/test/EndToEnd/EndToEndTest.cs +++ b/test/EndToEnd/EndToEndTest.cs @@ -5,6 +5,7 @@ using System; using System.IO; using System.Linq; using System.Runtime.InteropServices; +using Microsoft.DotNet.Cli.Utils; using Microsoft.DotNet.InternalAbstractions; using Microsoft.DotNet.PlatformAbstractions; using Microsoft.DotNet.Tools.Test.Utilities; @@ -196,7 +197,7 @@ namespace Microsoft.DotNet.Tests.EndToEnd TestProject = Path.Combine(TestDirectory, "project.json"); OutputDirectory = Path.Combine(TestDirectory, s_outputdirName); - Rid = RuntimeEnvironmentRidExtensions.GetLegacyRestoreRuntimeIdentifier(); + Rid = DotnetRuntimeIdentifiers.InferLegacyRestoreRuntimeIdentifier(); } private static void SetupStaticTestProject() diff --git a/test/EndToEnd/project.json b/test/EndToEnd/project.json index 6fe000820..c30a5571f 100644 --- a/test/EndToEnd/project.json +++ b/test/EndToEnd/project.json @@ -1,6 +1,7 @@ { "version": "1.0.0-*", "buildOptions": { + "keyFile": "../../tools/Key.snk", "emitEntryPoint": true }, "dependencies": { diff --git a/test/Microsoft.DotNet.Cli.Utils.Tests/GivenAProjectDependencyCommandResolver.cs b/test/Microsoft.DotNet.Cli.Utils.Tests/GivenAProjectDependencyCommandResolver.cs index b31838b92..3da4cab80 100644 --- a/test/Microsoft.DotNet.Cli.Utils.Tests/GivenAProjectDependencyCommandResolver.cs +++ b/test/Microsoft.DotNet.Cli.Utils.Tests/GivenAProjectDependencyCommandResolver.cs @@ -4,6 +4,7 @@ using System; using System.IO; using FluentAssertions; +using Microsoft.DotNet.Cli.Utils; using Microsoft.DotNet.InternalAbstractions; using Microsoft.DotNet.ProjectModel; using Microsoft.DotNet.Tools.Test.Utilities; @@ -227,8 +228,8 @@ namespace Microsoft.DotNet.Cli.Utils.Tests var projectContext = ProjectContext.Create( testInstance.Path, FrameworkConstants.CommonFrameworks.NetCoreApp10, - RuntimeEnvironmentRidExtensions.GetAllCandidateRuntimeIdentifiers()); - + DotnetRuntimeIdentifiers.InferCurrentRuntimeIdentifiers()); + var depsFilePath = projectContext.GetOutputPaths("Debug", outputPath: outputDir).RuntimeFiles.DepsJson; @@ -267,7 +268,7 @@ namespace Microsoft.DotNet.Cli.Utils.Tests var projectContext = ProjectContext.Create( testInstance.Path, FrameworkConstants.CommonFrameworks.NetCoreApp10, - RuntimeEnvironmentRidExtensions.GetAllCandidateRuntimeIdentifiers()); + DotnetRuntimeIdentifiers.InferCurrentRuntimeIdentifiers()); var depsFilePath = projectContext.GetOutputPaths("Debug", buildBasePath).RuntimeFiles.DepsJson; diff --git a/test/Microsoft.DotNet.Cli.Utils.Tests/StreamForwarderTests.cs b/test/Microsoft.DotNet.Cli.Utils.Tests/StreamForwarderTests.cs index b21bf321b..64e2f2be8 100644 --- a/test/Microsoft.DotNet.Cli.Utils.Tests/StreamForwarderTests.cs +++ b/test/Microsoft.DotNet.Cli.Utils.Tests/StreamForwarderTests.cs @@ -13,7 +13,7 @@ namespace StreamForwarderTests { public class StreamForwarderTests : TestBase { - private static readonly string s_rid = RuntimeEnvironmentRidExtensions.GetLegacyRestoreRuntimeIdentifier(); + private static readonly string s_rid = DotnetRuntimeIdentifiers.InferLegacyRestoreRuntimeIdentifier(); public static void Main() { diff --git a/test/Microsoft.DotNet.Cli.Utils.Tests/project.json b/test/Microsoft.DotNet.Cli.Utils.Tests/project.json index dcbb34626..85120b8a8 100644 --- a/test/Microsoft.DotNet.Cli.Utils.Tests/project.json +++ b/test/Microsoft.DotNet.Cli.Utils.Tests/project.json @@ -9,8 +9,12 @@ "../../TestAssets/TestProjects/TestAppWithArgs/*", "../../TestAssets/TestProjects/AppWithDirectAndToolDependency/**/*", "../../TestAssets/TestProjects/AppWithDirectDependency/**/*", - "../../TestAssets/TestProjects/AppWithToolDependency/**/*" - ] + "../../TestAssets/TestProjects/AppWithToolDependency/**/*", + "../../artifacts/*/stage2/sdk/*/.version" + ], + "mappings": { + ".version": "../../artifacts/*/stage2/sdk/*/.version" + } } }, "dependencies": { diff --git a/test/Microsoft.DotNet.Tools.Tests.Utilities/Commands/PublishCommand.cs b/test/Microsoft.DotNet.Tools.Tests.Utilities/Commands/PublishCommand.cs index 0ea9d233b..a1802db0a 100644 --- a/test/Microsoft.DotNet.Tools.Tests.Utilities/Commands/PublishCommand.cs +++ b/test/Microsoft.DotNet.Tools.Tests.Utilities/Commands/PublishCommand.cs @@ -72,7 +72,9 @@ namespace Microsoft.DotNet.Tools.Test.Utilities if (!portable) { - var runtime = string.IsNullOrEmpty(_runtime) ? RuntimeEnvironmentRidExtensions.GetLegacyRestoreRuntimeIdentifier() : _runtime; + var runtime = string.IsNullOrEmpty(_runtime) ? + DotnetRuntimeIdentifiers.InferLegacyRestoreRuntimeIdentifier() : + _runtime; return Path.Combine(config, framework, runtime, PublishSubfolderName); } else diff --git a/test/dotnet-compile.UnitTests/GivenThatICareAboutScriptVariablesFromAManagedCompiler.cs b/test/dotnet-compile.UnitTests/GivenThatICareAboutScriptVariablesFromAManagedCompiler.cs index cd0f3eb70..6fab41809 100644 --- a/test/dotnet-compile.UnitTests/GivenThatICareAboutScriptVariablesFromAManagedCompiler.cs +++ b/test/dotnet-compile.UnitTests/GivenThatICareAboutScriptVariablesFromAManagedCompiler.cs @@ -69,7 +69,7 @@ namespace Microsoft.DotNet.Tools.Compiler.Tests [Fact] public void It_passes_a_RuntimeOutputDir_variable_to_the_pre_compile_scripts_if_rid_is_set_in_the_ProjectContext() { - var rid = RuntimeEnvironmentRidExtensions.GetLegacyRestoreRuntimeIdentifier(); + var rid = DotnetRuntimeIdentifiers.InferLegacyRestoreRuntimeIdentifier(); var fixture = ScriptVariablesFixture.GetFixtureWithRids(rid); fixture.PreCompileScriptVariables.Should().ContainKey("compile:RuntimeOutputDir"); fixture.PreCompileScriptVariables["compile:RuntimeOutputDir"].Should().Be(fixture.RuntimeOutputDir); @@ -128,7 +128,7 @@ namespace Microsoft.DotNet.Tools.Compiler.Tests [Fact] public void It_passes_a_RuntimeOutputDir_variable_to_the_post_compile_scripts_if_rid_is_set_in_the_ProjectContext() { - var rid = RuntimeEnvironmentRidExtensions.GetLegacyRestoreRuntimeIdentifier(); + var rid = DotnetRuntimeIdentifiers.InferLegacyRestoreRuntimeIdentifier(); var fixture = ScriptVariablesFixture.GetFixtureWithRids(rid); fixture.PostCompileScriptVariables.Should().ContainKey("compile:RuntimeOutputDir"); fixture.PostCompileScriptVariables["compile:RuntimeOutputDir"].Should().Be(fixture.RuntimeOutputDir); diff --git a/test/dotnet-compile.UnitTests/project.json b/test/dotnet-compile.UnitTests/project.json index e6c63052f..b685f702a 100644 --- a/test/dotnet-compile.UnitTests/project.json +++ b/test/dotnet-compile.UnitTests/project.json @@ -4,8 +4,12 @@ "keyFile": "../../tools/Key.snk", "copyToOutput": { "include": [ - "../../TestAssets/TestProjects/TestAppWithLibrary/**/*" - ] + "../../TestAssets/TestProjects/TestAppWithLibrary/**/*", + "../../artifacts/*/stage2/sdk/*/.version" + ], + "mappings": { + ".version": "../../artifacts/*/stage2/sdk/*/.version" + } } }, "dependencies": { diff --git a/test/dotnet-publish.Tests/PublishDesktopTests.cs b/test/dotnet-publish.Tests/PublishDesktopTests.cs index afea20671..4572bc833 100644 --- a/test/dotnet-publish.Tests/PublishDesktopTests.cs +++ b/test/dotnet-publish.Tests/PublishDesktopTests.cs @@ -3,6 +3,7 @@ using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Threading.Tasks; using FluentAssertions; +using Microsoft.DotNet.Cli.Utils; using Microsoft.DotNet.InternalAbstractions; using Microsoft.DotNet.TestFramework; using Microsoft.DotNet.Tools.Test.Utilities; @@ -54,7 +55,9 @@ namespace Microsoft.DotNet.Tools.Publish.Tests [InlineData("KestrelDesktop", "http://localhost:20207", "win7-x86", "libuv.dll", false)] public async Task DesktopApp_WithKestrel_WorksWhenPublished(string project, string url, string runtime, string libuvName, bool forceRunnable) { - var runnable = forceRunnable || string.IsNullOrEmpty(runtime) || (RuntimeEnvironmentRidExtensions.GetLegacyRestoreRuntimeIdentifier().Contains(runtime)); + var runnable = forceRunnable || + string.IsNullOrEmpty(runtime) || + (DotnetRuntimeIdentifiers.InferLegacyRestoreRuntimeIdentifier().Contains(runtime)); var testInstance = GetTestInstance() .WithLockFiles(); diff --git a/test/dotnet-publish.Tests/PublishTests.cs b/test/dotnet-publish.Tests/PublishTests.cs index 8aaf45919..b781bb614 100644 --- a/test/dotnet-publish.Tests/PublishTests.cs +++ b/test/dotnet-publish.Tests/PublishTests.cs @@ -5,6 +5,7 @@ using System; using System.Collections.Generic; using System.IO; using System.Text.RegularExpressions; +using Microsoft.DotNet.Cli.Utils; using Microsoft.DotNet.InternalAbstractions; using Microsoft.DotNet.TestFramework; using Microsoft.DotNet.Tools.Test.Utilities; @@ -58,11 +59,11 @@ namespace Microsoft.DotNet.Tools.Publish.Tests { new object[] { "1", "", "", "", "" }, new object[] { "2", "netcoreapp1.0", "", "", "" }, - new object[] { "3", "", RuntimeEnvironmentRidExtensions.GetLegacyRestoreRuntimeIdentifier(), "", "" }, + new object[] { "3", "", DotnetRuntimeIdentifiers.InferLegacyRestoreRuntimeIdentifier(), "", "" }, new object[] { "4", "", "", "Release", "" }, new object[] { "5", "", "", "", "some/dir"}, new object[] { "6", "", "", "", "some/dir/with spaces" }, - new object[] { "7", "netcoreapp1.0", RuntimeEnvironmentRidExtensions.GetLegacyRestoreRuntimeIdentifier(), "Debug", "some/dir" }, + new object[] { "7", "netcoreapp1.0", DotnetRuntimeIdentifiers.InferLegacyRestoreRuntimeIdentifier(), "Debug", "some/dir" }, }; } } @@ -221,7 +222,10 @@ namespace Microsoft.DotNet.Tools.Publish.Tests publishCommand.GetOutputDirectory().Should().HaveFile("Newtonsoft.Json.dll"); publishCommand.GetOutputDirectory().Delete(true); - publishCommand = new PublishCommand(lesserTestProject, "netcoreapp1.0", RuntimeEnvironmentRidExtensions.GetLegacyRestoreRuntimeIdentifier()); + publishCommand = new PublishCommand( + lesserTestProject, + "netcoreapp1.0", + DotnetRuntimeIdentifiers.InferLegacyRestoreRuntimeIdentifier()); publishCommand.Execute().Should().Pass(); publishCommand.GetOutputDirectory().Should().HaveFile("TestLibraryLesser.dll"); diff --git a/test/dotnet-publish.Tests/project.json b/test/dotnet-publish.Tests/project.json index 96b9044db..5dbb49642 100644 --- a/test/dotnet-publish.Tests/project.json +++ b/test/dotnet-publish.Tests/project.json @@ -1,5 +1,16 @@ { "version": "1.0.0-*", + "buildOptions": { + "keyFile": "../../tools/Key.snk", + "copyToOutput": { + "include": [ + "../../artifacts/*/stage2/sdk/*/.version" + ], + "mappings": { + ".version": "../../artifacts/*/stage2/sdk/*/.version" + } + } + }, "dependencies": { "Microsoft.NETCore.App": { "type": "platform", @@ -12,6 +23,9 @@ "Microsoft.DotNet.Tools.Tests.Utilities": { "target": "project" }, + "Microsoft.DotNet.Cli.Utils": { + "target": "project" + }, "xunit": "2.2.0-beta3-build3330", "xunit.netcore.extensions": "1.0.0-prerelease-00206", "dotnet-test-xunit": "1.0.0-rc2-350904-49", diff --git a/test/dotnet-publish3.Tests/GivenDotnetPublish3PublishesProjects.cs b/test/dotnet-publish3.Tests/GivenDotnetPublish3PublishesProjects.cs index 6d88fed0a..a7af09e7d 100644 --- a/test/dotnet-publish3.Tests/GivenDotnetPublish3PublishesProjects.cs +++ b/test/dotnet-publish3.Tests/GivenDotnetPublish3PublishesProjects.cs @@ -53,7 +53,7 @@ namespace Microsoft.DotNet.Cli.Publish3.Tests .CreateTestInstance(testAppName); var testProjectDirectory = testInstance.TestRoot; - var rid = RuntimeEnvironment.GetRuntimeIdentifier(); + var rid = DotnetRuntimeIdentifiers.InferLegacyRestoreRuntimeIdentifier(); new Publish3Command() .WithFramework("netcoreapp1.0") diff --git a/test/dotnet-publish3.Tests/project.json b/test/dotnet-publish3.Tests/project.json index 3ee83c3ca..42ad44365 100644 --- a/test/dotnet-publish3.Tests/project.json +++ b/test/dotnet-publish3.Tests/project.json @@ -1,5 +1,16 @@ { "version": "1.0.0-*", + "buildOptions": { + "keyFile": "../../tools/Key.snk", + "copyToOutput": { + "include": [ + "../../artifacts/*/stage2/sdk/*/.version" + ], + "mappings": { + ".version": "../../artifacts/*/stage2/sdk/*/.version" + } + } + }, "dependencies": { "Microsoft.NETCore.App": { "type": "platform", diff --git a/test/dotnet-run.UnitTests/project.json b/test/dotnet-run.UnitTests/project.json index 549a6ce2a..126e1d368 100644 --- a/test/dotnet-run.UnitTests/project.json +++ b/test/dotnet-run.UnitTests/project.json @@ -1,5 +1,15 @@ { "version": "1.0.0-*", + "buildOptions": { + "copyToOutput": { + "include": [ + "../../artifacts/*/stage2/sdk/*/.version" + ], + "mappings": { + ".version": "../../artifacts/*/stage2/sdk/*/.version" + } + } + }, "dependencies": { "Microsoft.NETCore.App": { "type": "platform", diff --git a/test/dotnet.Tests/PackagedCommandTests.cs b/test/dotnet.Tests/PackagedCommandTests.cs index 4670ee746..301bcff84 100644 --- a/test/dotnet.Tests/PackagedCommandTests.cs +++ b/test/dotnet.Tests/PackagedCommandTests.cs @@ -22,7 +22,7 @@ namespace Microsoft.DotNet.Tests { get { - var rid = RuntimeEnvironmentRidExtensions.GetLegacyRestoreRuntimeIdentifier(); + var rid = DotnetRuntimeIdentifiers.InferLegacyRestoreRuntimeIdentifier(); var projectOutputPath = $"AppWithDirectDepDesktopAndPortable\\bin\\Debug\\net451\\{rid}\\dotnet-desktop-and-portable.exe"; return new[] { @@ -36,7 +36,7 @@ namespace Microsoft.DotNet.Tests { get { - var rid = RuntimeEnvironmentRidExtensions.GetLegacyRestoreRuntimeIdentifier(); + var rid = DotnetRuntimeIdentifiers.InferLegacyRestoreRuntimeIdentifier(); var projectOutputPath = $"LibraryWithDirectDependencyDesktopAndPortable\\bin\\Debug\\net451\\dotnet-desktop-and-portable.exe"; return new[] { From c2bce2e2cc7aa57997907db3dd6bb7bc160ec10e Mon Sep 17 00:00:00 2001 From: Livar Cunha Date: Mon, 10 Oct 2016 09:52:39 -0700 Subject: [PATCH 2/2] Moving the InferLegacyRestoreRuntime method to Test.Utilities, since it is needed only by tests. --- .../DotnetRuntimeIdentifiers.cs | 19 ------------ .../Properties/AssemblyInfo.cs | 5 ---- test/EndToEnd/EndToEndTest.cs | 3 +- test/EndToEnd/project.json | 1 - .../StreamForwarderTests.cs | 2 +- .../Commands/PublishCommand.cs | 2 +- .../DotnetLegacyRuntimeIdentifiers.cs | 30 +++++++++++++++++++ ...boutScriptVariablesFromAManagedCompiler.cs | 5 ++-- test/dotnet-compile.UnitTests/project.json | 3 ++ .../PublishDesktopTests.cs | 3 +- test/dotnet-publish.Tests/PublishTests.cs | 7 ++--- test/dotnet-publish.Tests/project.json | 4 --- .../GivenDotnetPublish3PublishesProjects.cs | 2 +- test/dotnet-publish3.Tests/project.json | 1 - test/dotnet.Tests/PackagedCommandTests.cs | 4 +-- 15 files changed, 46 insertions(+), 45 deletions(-) create mode 100644 test/Microsoft.DotNet.Tools.Tests.Utilities/DotnetLegacyRuntimeIdentifiers.cs diff --git a/src/Microsoft.DotNet.Cli.Utils/DotnetRuntimeIdentifiers.cs b/src/Microsoft.DotNet.Cli.Utils/DotnetRuntimeIdentifiers.cs index b908c5d4b..7f3da4c22 100644 --- a/src/Microsoft.DotNet.Cli.Utils/DotnetRuntimeIdentifiers.cs +++ b/src/Microsoft.DotNet.Cli.Utils/DotnetRuntimeIdentifiers.cs @@ -3,7 +3,6 @@ using System.Collections.Generic; using Microsoft.DotNet.InternalAbstractions; -using Microsoft.DotNet.PlatformAbstractions; namespace Microsoft.DotNet.Cli.Utils { @@ -32,23 +31,5 @@ namespace Microsoft.DotNet.Cli.Utils return RuntimeEnvironmentRidExtensions.GetAllCandidateRuntimeIdentifiers(fallbackIdentifiers); } - - // Gets the identfier that is used for restore by default (this is different from the actual RID, but only on Windows) - public static string InferLegacyRestoreRuntimeIdentifier() - { - if (RuntimeEnvironment.OperatingSystemPlatform != Platform.Windows) - { - FrameworkDependencyFile fxDepsFile = new FrameworkDependencyFile(); - return fxDepsFile.SupportsCurrentRuntime() ? - RuntimeEnvironment.GetRuntimeIdentifier() : - DotnetFiles.VersionFileObject.BuildRid; - - } - else - { - var arch = RuntimeEnvironment.RuntimeArchitecture.ToLowerInvariant(); - return "win7-" + arch; - } - } } } diff --git a/src/Microsoft.DotNet.Cli.Utils/Properties/AssemblyInfo.cs b/src/Microsoft.DotNet.Cli.Utils/Properties/AssemblyInfo.cs index 840b2d5c8..7d41c16db 100644 --- a/src/Microsoft.DotNet.Cli.Utils/Properties/AssemblyInfo.cs +++ b/src/Microsoft.DotNet.Cli.Utils/Properties/AssemblyInfo.cs @@ -5,9 +5,4 @@ using System.Runtime.CompilerServices; [assembly: InternalsVisibleTo("dotnet, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")] [assembly: InternalsVisibleTo("Microsoft.DotNet.Tools.Test, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")] [assembly: InternalsVisibleTo("Microsoft.DotNet.Cli.Utils.Tests, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")] -[assembly: InternalsVisibleTo("dotnet-compile.UnitTests, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")] -[assembly: InternalsVisibleTo("dotnet-publish.Tests, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")] -[assembly: InternalsVisibleTo("dotnet.Tests, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")] -[assembly: InternalsVisibleTo("EndToEnd, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")] [assembly: InternalsVisibleTo("Microsoft.DotNet.Tools.Tests.Utilities, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")] -[assembly: InternalsVisibleTo("dotnet-publish3.Tests, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")] diff --git a/test/EndToEnd/EndToEndTest.cs b/test/EndToEnd/EndToEndTest.cs index d62a6966c..5904a7108 100644 --- a/test/EndToEnd/EndToEndTest.cs +++ b/test/EndToEnd/EndToEndTest.cs @@ -5,7 +5,6 @@ using System; using System.IO; using System.Linq; using System.Runtime.InteropServices; -using Microsoft.DotNet.Cli.Utils; using Microsoft.DotNet.InternalAbstractions; using Microsoft.DotNet.PlatformAbstractions; using Microsoft.DotNet.Tools.Test.Utilities; @@ -197,7 +196,7 @@ namespace Microsoft.DotNet.Tests.EndToEnd TestProject = Path.Combine(TestDirectory, "project.json"); OutputDirectory = Path.Combine(TestDirectory, s_outputdirName); - Rid = DotnetRuntimeIdentifiers.InferLegacyRestoreRuntimeIdentifier(); + Rid = DotnetLegacyRuntimeIdentifiers.InferLegacyRestoreRuntimeIdentifier(); } private static void SetupStaticTestProject() diff --git a/test/EndToEnd/project.json b/test/EndToEnd/project.json index c30a5571f..6fe000820 100644 --- a/test/EndToEnd/project.json +++ b/test/EndToEnd/project.json @@ -1,7 +1,6 @@ { "version": "1.0.0-*", "buildOptions": { - "keyFile": "../../tools/Key.snk", "emitEntryPoint": true }, "dependencies": { diff --git a/test/Microsoft.DotNet.Cli.Utils.Tests/StreamForwarderTests.cs b/test/Microsoft.DotNet.Cli.Utils.Tests/StreamForwarderTests.cs index 64e2f2be8..109d7dbf8 100644 --- a/test/Microsoft.DotNet.Cli.Utils.Tests/StreamForwarderTests.cs +++ b/test/Microsoft.DotNet.Cli.Utils.Tests/StreamForwarderTests.cs @@ -13,7 +13,7 @@ namespace StreamForwarderTests { public class StreamForwarderTests : TestBase { - private static readonly string s_rid = DotnetRuntimeIdentifiers.InferLegacyRestoreRuntimeIdentifier(); + private static readonly string s_rid = DotnetLegacyRuntimeIdentifiers.InferLegacyRestoreRuntimeIdentifier(); public static void Main() { diff --git a/test/Microsoft.DotNet.Tools.Tests.Utilities/Commands/PublishCommand.cs b/test/Microsoft.DotNet.Tools.Tests.Utilities/Commands/PublishCommand.cs index a1802db0a..f652c7a72 100644 --- a/test/Microsoft.DotNet.Tools.Tests.Utilities/Commands/PublishCommand.cs +++ b/test/Microsoft.DotNet.Tools.Tests.Utilities/Commands/PublishCommand.cs @@ -73,7 +73,7 @@ namespace Microsoft.DotNet.Tools.Test.Utilities if (!portable) { var runtime = string.IsNullOrEmpty(_runtime) ? - DotnetRuntimeIdentifiers.InferLegacyRestoreRuntimeIdentifier() : + DotnetLegacyRuntimeIdentifiers.InferLegacyRestoreRuntimeIdentifier() : _runtime; return Path.Combine(config, framework, runtime, PublishSubfolderName); } diff --git a/test/Microsoft.DotNet.Tools.Tests.Utilities/DotnetLegacyRuntimeIdentifiers.cs b/test/Microsoft.DotNet.Tools.Tests.Utilities/DotnetLegacyRuntimeIdentifiers.cs new file mode 100644 index 000000000..d12593b21 --- /dev/null +++ b/test/Microsoft.DotNet.Tools.Tests.Utilities/DotnetLegacyRuntimeIdentifiers.cs @@ -0,0 +1,30 @@ +// Copyright (c) .NET Foundation and contributors. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. + +using System.Collections.Generic; +using Microsoft.DotNet.Cli.Utils; +using Microsoft.DotNet.InternalAbstractions; +using Microsoft.DotNet.PlatformAbstractions; + +namespace Microsoft.DotNet.Tools.Test.Utilities +{ + public static class DotnetLegacyRuntimeIdentifiers + { + public static string InferLegacyRestoreRuntimeIdentifier() + { + if (RuntimeEnvironment.OperatingSystemPlatform != Platform.Windows) + { + FrameworkDependencyFile fxDepsFile = new FrameworkDependencyFile(); + return fxDepsFile.SupportsCurrentRuntime() ? + RuntimeEnvironment.GetRuntimeIdentifier() : + DotnetFiles.VersionFileObject.BuildRid; + + } + else + { + var arch = RuntimeEnvironment.RuntimeArchitecture.ToLowerInvariant(); + return "win7-" + arch; + } + } + } +} \ No newline at end of file diff --git a/test/dotnet-compile.UnitTests/GivenThatICareAboutScriptVariablesFromAManagedCompiler.cs b/test/dotnet-compile.UnitTests/GivenThatICareAboutScriptVariablesFromAManagedCompiler.cs index 6fab41809..d2cd9b000 100644 --- a/test/dotnet-compile.UnitTests/GivenThatICareAboutScriptVariablesFromAManagedCompiler.cs +++ b/test/dotnet-compile.UnitTests/GivenThatICareAboutScriptVariablesFromAManagedCompiler.cs @@ -8,6 +8,7 @@ using FluentAssertions; using Microsoft.DotNet.Cli.Utils; using Microsoft.DotNet.InternalAbstractions; using Microsoft.DotNet.ProjectModel; +using Microsoft.DotNet.Tools.Test.Utilities; using Moq; using NuGet.Frameworks; using Xunit; @@ -69,7 +70,7 @@ namespace Microsoft.DotNet.Tools.Compiler.Tests [Fact] public void It_passes_a_RuntimeOutputDir_variable_to_the_pre_compile_scripts_if_rid_is_set_in_the_ProjectContext() { - var rid = DotnetRuntimeIdentifiers.InferLegacyRestoreRuntimeIdentifier(); + var rid = DotnetLegacyRuntimeIdentifiers.InferLegacyRestoreRuntimeIdentifier(); var fixture = ScriptVariablesFixture.GetFixtureWithRids(rid); fixture.PreCompileScriptVariables.Should().ContainKey("compile:RuntimeOutputDir"); fixture.PreCompileScriptVariables["compile:RuntimeOutputDir"].Should().Be(fixture.RuntimeOutputDir); @@ -128,7 +129,7 @@ namespace Microsoft.DotNet.Tools.Compiler.Tests [Fact] public void It_passes_a_RuntimeOutputDir_variable_to_the_post_compile_scripts_if_rid_is_set_in_the_ProjectContext() { - var rid = DotnetRuntimeIdentifiers.InferLegacyRestoreRuntimeIdentifier(); + var rid = DotnetLegacyRuntimeIdentifiers.InferLegacyRestoreRuntimeIdentifier(); var fixture = ScriptVariablesFixture.GetFixtureWithRids(rid); fixture.PostCompileScriptVariables.Should().ContainKey("compile:RuntimeOutputDir"); fixture.PostCompileScriptVariables["compile:RuntimeOutputDir"].Should().Be(fixture.RuntimeOutputDir); diff --git a/test/dotnet-compile.UnitTests/project.json b/test/dotnet-compile.UnitTests/project.json index b685f702a..30181887f 100644 --- a/test/dotnet-compile.UnitTests/project.json +++ b/test/dotnet-compile.UnitTests/project.json @@ -33,6 +33,9 @@ "Microsoft.DotNet.ProjectModel": { "target": "project" }, + "Microsoft.DotNet.Tools.Tests.Utilities": { + "target": "project" + }, "xunit": "2.2.0-beta3-build3330", "dotnet-test-xunit": "1.0.0-rc2-350904-49", "moq.netcore": "4.4.0-beta8", diff --git a/test/dotnet-publish.Tests/PublishDesktopTests.cs b/test/dotnet-publish.Tests/PublishDesktopTests.cs index 4572bc833..272c2e3cf 100644 --- a/test/dotnet-publish.Tests/PublishDesktopTests.cs +++ b/test/dotnet-publish.Tests/PublishDesktopTests.cs @@ -3,7 +3,6 @@ using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Threading.Tasks; using FluentAssertions; -using Microsoft.DotNet.Cli.Utils; using Microsoft.DotNet.InternalAbstractions; using Microsoft.DotNet.TestFramework; using Microsoft.DotNet.Tools.Test.Utilities; @@ -57,7 +56,7 @@ namespace Microsoft.DotNet.Tools.Publish.Tests { var runnable = forceRunnable || string.IsNullOrEmpty(runtime) || - (DotnetRuntimeIdentifiers.InferLegacyRestoreRuntimeIdentifier().Contains(runtime)); + (DotnetLegacyRuntimeIdentifiers.InferLegacyRestoreRuntimeIdentifier().Contains(runtime)); var testInstance = GetTestInstance() .WithLockFiles(); diff --git a/test/dotnet-publish.Tests/PublishTests.cs b/test/dotnet-publish.Tests/PublishTests.cs index b781bb614..d6f355ae1 100644 --- a/test/dotnet-publish.Tests/PublishTests.cs +++ b/test/dotnet-publish.Tests/PublishTests.cs @@ -5,7 +5,6 @@ using System; using System.Collections.Generic; using System.IO; using System.Text.RegularExpressions; -using Microsoft.DotNet.Cli.Utils; using Microsoft.DotNet.InternalAbstractions; using Microsoft.DotNet.TestFramework; using Microsoft.DotNet.Tools.Test.Utilities; @@ -59,11 +58,11 @@ namespace Microsoft.DotNet.Tools.Publish.Tests { new object[] { "1", "", "", "", "" }, new object[] { "2", "netcoreapp1.0", "", "", "" }, - new object[] { "3", "", DotnetRuntimeIdentifiers.InferLegacyRestoreRuntimeIdentifier(), "", "" }, + new object[] { "3", "", DotnetLegacyRuntimeIdentifiers.InferLegacyRestoreRuntimeIdentifier(), "", "" }, new object[] { "4", "", "", "Release", "" }, new object[] { "5", "", "", "", "some/dir"}, new object[] { "6", "", "", "", "some/dir/with spaces" }, - new object[] { "7", "netcoreapp1.0", DotnetRuntimeIdentifiers.InferLegacyRestoreRuntimeIdentifier(), "Debug", "some/dir" }, + new object[] { "7", "netcoreapp1.0", DotnetLegacyRuntimeIdentifiers.InferLegacyRestoreRuntimeIdentifier(), "Debug", "some/dir" }, }; } } @@ -225,7 +224,7 @@ namespace Microsoft.DotNet.Tools.Publish.Tests publishCommand = new PublishCommand( lesserTestProject, "netcoreapp1.0", - DotnetRuntimeIdentifiers.InferLegacyRestoreRuntimeIdentifier()); + DotnetLegacyRuntimeIdentifiers.InferLegacyRestoreRuntimeIdentifier()); publishCommand.Execute().Should().Pass(); publishCommand.GetOutputDirectory().Should().HaveFile("TestLibraryLesser.dll"); diff --git a/test/dotnet-publish.Tests/project.json b/test/dotnet-publish.Tests/project.json index 5dbb49642..e829f23fb 100644 --- a/test/dotnet-publish.Tests/project.json +++ b/test/dotnet-publish.Tests/project.json @@ -1,7 +1,6 @@ { "version": "1.0.0-*", "buildOptions": { - "keyFile": "../../tools/Key.snk", "copyToOutput": { "include": [ "../../artifacts/*/stage2/sdk/*/.version" @@ -23,9 +22,6 @@ "Microsoft.DotNet.Tools.Tests.Utilities": { "target": "project" }, - "Microsoft.DotNet.Cli.Utils": { - "target": "project" - }, "xunit": "2.2.0-beta3-build3330", "xunit.netcore.extensions": "1.0.0-prerelease-00206", "dotnet-test-xunit": "1.0.0-rc2-350904-49", diff --git a/test/dotnet-publish3.Tests/GivenDotnetPublish3PublishesProjects.cs b/test/dotnet-publish3.Tests/GivenDotnetPublish3PublishesProjects.cs index a7af09e7d..55e15c862 100644 --- a/test/dotnet-publish3.Tests/GivenDotnetPublish3PublishesProjects.cs +++ b/test/dotnet-publish3.Tests/GivenDotnetPublish3PublishesProjects.cs @@ -53,7 +53,7 @@ namespace Microsoft.DotNet.Cli.Publish3.Tests .CreateTestInstance(testAppName); var testProjectDirectory = testInstance.TestRoot; - var rid = DotnetRuntimeIdentifiers.InferLegacyRestoreRuntimeIdentifier(); + var rid = DotnetLegacyRuntimeIdentifiers.InferLegacyRestoreRuntimeIdentifier(); new Publish3Command() .WithFramework("netcoreapp1.0") diff --git a/test/dotnet-publish3.Tests/project.json b/test/dotnet-publish3.Tests/project.json index 42ad44365..4938f6a74 100644 --- a/test/dotnet-publish3.Tests/project.json +++ b/test/dotnet-publish3.Tests/project.json @@ -1,7 +1,6 @@ { "version": "1.0.0-*", "buildOptions": { - "keyFile": "../../tools/Key.snk", "copyToOutput": { "include": [ "../../artifacts/*/stage2/sdk/*/.version" diff --git a/test/dotnet.Tests/PackagedCommandTests.cs b/test/dotnet.Tests/PackagedCommandTests.cs index 301bcff84..2d0a07722 100644 --- a/test/dotnet.Tests/PackagedCommandTests.cs +++ b/test/dotnet.Tests/PackagedCommandTests.cs @@ -22,7 +22,7 @@ namespace Microsoft.DotNet.Tests { get { - var rid = DotnetRuntimeIdentifiers.InferLegacyRestoreRuntimeIdentifier(); + var rid = DotnetLegacyRuntimeIdentifiers.InferLegacyRestoreRuntimeIdentifier(); var projectOutputPath = $"AppWithDirectDepDesktopAndPortable\\bin\\Debug\\net451\\{rid}\\dotnet-desktop-and-portable.exe"; return new[] { @@ -36,7 +36,7 @@ namespace Microsoft.DotNet.Tests { get { - var rid = DotnetRuntimeIdentifiers.InferLegacyRestoreRuntimeIdentifier(); + var rid = DotnetLegacyRuntimeIdentifiers.InferLegacyRestoreRuntimeIdentifier(); var projectOutputPath = $"LibraryWithDirectDependencyDesktopAndPortable\\bin\\Debug\\net451\\dotnet-desktop-and-portable.exe"; return new[] {