diff --git a/build/BuildDefaults.props b/build/BuildDefaults.props
index c78a5c0d9..5920d181c 100644
--- a/build/BuildDefaults.props
+++ b/build/BuildDefaults.props
@@ -2,11 +2,12 @@
Prepare;Compile;Test;Package;Publish
Debug
- true
+ false
true
false
true
false
true
+ true
diff --git a/build/LegacyRuntimes.props b/build/LegacyRuntimes.props
new file mode 100644
index 000000000..3ece929da
--- /dev/null
+++ b/build/LegacyRuntimes.props
@@ -0,0 +1,57 @@
+
+
+ release/1.1.0
+ 1.1.1
+ 1.1.0
+ 1.1.0
+
+ dotnet-host-$(ProductMonikerRid).$(Legacy110SharedHostVersion)$(InstallerExtension)
+ $(PackagesDirectory)/$(Legacy110DownloadedSharedHostInstallerFileName)
+
+ dotnet-hostfxr-$(ProductMonikerRid).$(Legacy110HostFxrVersion)$(InstallerExtension)
+ $(PackagesDirectory)/$(Legacy110DownloadedHostFxrInstallerFileName)
+
+ dotnet-sharedframework-$(ProductMonikerRid).$(Legacy110SharedFrameworkVersion)$(InstallerExtension)
+ $(PackagesDirectory)/$(Legacy110DownloadedSharedFrameworkInstallerFileName)
+
+ dotnet-$(ProductMonikerRid).$(Legacy110SharedFrameworkVersion)$(ArchiveExtension)
+
+ $(CoreSetupBlobRootUrl)$(Legacy110CoreSetupChannel)
+ $(Legacy110CoreSetupBlobRootUrlWithChannel)/Binaries/$(Legacy110SharedFrameworkVersion)
+ $(Legacy110CoreSetupBlobRootUrlWithChannel)/Installers
+ $(IntermediateDirectory)/coreSetupDownload/$(Legacy110SharedFrameworkVersion)
+ $(Legacy110CoreSetupDownloadDirectory)/combinedSharedHostAndFrameworkArchive
+
+
+
+ <_DownloadAndExtractItem Include="Legacy110CombinedSharedHostAndFrameworkArchive"
+ Condition="!Exists('$(Legacy110CombinedSharedHostAndFrameworkArchive)')">
+ $(Legacy110SharedFrameworkArchiveBlobRootUrl)/$(Legacy110CombinedFrameworkHostCompressedFileName)
+ $(Legacy110CombinedSharedHostAndFrameworkArchive)
+ $(LegacySharedFrameworkPublishDirectory)
+
+ False
+
+
+ <_DownloadAndExtractItem Include="Legacy110DownloadedSharedFrameworkInstallerFile"
+ Condition="!Exists('$(Legacy110DownloadedSharedFrameworkInstallerFile)') And '$(InstallerExtension)' != ''">
+ $(Legacy110CoreSetupInstallerBlobRootUrl)/$(Legacy110SharedFrameworkVersion)/$(Legacy110DownloadedSharedFrameworkInstallerFileName)
+ $(Legacy110DownloadedSharedFrameworkInstallerFile)
+
+
+
+ <_DownloadAndExtractItem Include="Legacy110DownloadedSharedHostInstallerFile"
+ Condition="!Exists('$(Legacy110DownloadedSharedHostInstallerFile)') And '$(InstallerExtension)' != ''">
+ $(Legacy110CoreSetupInstallerBlobRootUrl)/$(Legacy110SharedHostVersion)/$(Legacy110DownloadedSharedHostInstallerFileName)
+ $(Legacy110DownloadedSharedHostInstallerFile)
+
+
+
+ <_DownloadAndExtractItem Include="Legacy110DownloadedHostFxrInstallerFile"
+ Condition="!Exists('$(Legacy110DownloadedHostFxrInstallerFile)') And '$(InstallerExtension)' != ''">
+ $(Legacy110CoreSetupInstallerBlobRootUrl)/$(Legacy110HostFxrVersion)/$(Legacy110DownloadedHostFxrInstallerFileName)
+ $(Legacy110DownloadedHostFxrInstallerFile)
+
+
+
+
\ No newline at end of file
diff --git a/build/OutputDirectories.props b/build/OutputDirectories.props
index 3732acaaf..63c232211 100644
--- a/build/OutputDirectories.props
+++ b/build/OutputDirectories.props
@@ -2,6 +2,7 @@
$(RepoRoot)/artifacts/$(Rid)
$(BaseOutputDirectory)/stage2
+ $(BaseOutputDirectory)/stage2WithLegacyRuntime
$(OutputDirectory)/sdk/$(SdkVersion)
$(BaseOutputDirectory)/stage2symbols
$(SdkOutputDirectory)/Roslyn
@@ -9,6 +10,7 @@
$(BaseOutputDirectory)/intermediate
$(BaseOutputDirectory)/packages
$(IntermediateDirectory)/sharedFrameworkPublish
+ $(IntermediateDirectory)/legacySharedFrameworkPublish
$(RepoRoot)/artifacts/testpackages/
$(OutputDirectory)/dotnet$(ExeExtension)
$(IntermediateDirectory)/GeneratedMSBuildExtensions
diff --git a/build/package/Installer.PKG.targets b/build/package/Installer.PKG.targets
index 361d51ad5..d1fa62d90 100644
--- a/build/package/Installer.PKG.targets
+++ b/build/package/Installer.PKG.targets
@@ -21,6 +21,7 @@
$(SdkPkgSourcesRootDirectory)/resources
$(SdkPkgSourcesRootDirectory)/Distribution-Template
+ $(SdkPkgSourcesRootDirectory)/Distribution-TemplateWithAdditionalRuntime
$(PkgIntermediateDirectory)/CLI-SDK-Formatted-Distribution-Template.xml
$(PkgIntermediateDirectory)/$(SdkComponentId).pkg
@@ -44,15 +45,6 @@
$(HostFxrComponentId)
-
- $(AdditionalSharedFrameworkComponentId)
-
-
- $(AdditionalSharedHostComponentId)
-
-
- $(AdditionalHostFxrComponentId)
-
$(SdkComponentId)
@@ -71,6 +63,19 @@
$(HostFxrBrandName)
+
+
+
+
+
+ $(AdditionalSharedFrameworkComponentId)
+
+
+ $(AdditionalSharedHostComponentId)
+
+
+ $(AdditionalHostFxrComponentId)
+
$(AdditionalSharedFrameworkBrandName)
@@ -97,7 +102,9 @@
+
+
@@ -124,22 +131,28 @@
Outputs="$(CombinedFrameworkSdkHostInstallerFile)"
DependsOnTargets="GenerateSdkPkg"
Condition=" '$(OSName)' == 'osx' ">
+
+
+
+
+
+
+
+
+
+
-
+
+
diff --git a/packaging/osx/clisdk/Distribution-Template b/packaging/osx/clisdk/Distribution-Template
index 82550f6f1..d70c70cc4 100644
--- a/packaging/osx/clisdk/Distribution-Template
+++ b/packaging/osx/clisdk/Distribution-Template
@@ -17,9 +17,6 @@
-
-
-
@@ -31,23 +28,11 @@
-
-
-
-
-
-
-
-
-
{SharedFxComponentId}.pkg
{HostFxrComponentId}.pkg
{SharedHostComponentId}.pkg
- {AdditionalSharedFxComponentId}.pkg
- {AdditionalHostFxrComponentId}.pkg
- {AdditionalSharedHostComponentId}.pkg
{CLISdkComponentId}.pkg
diff --git a/packaging/osx/clisdk/Distribution-TemplateWithAdditionalRuntime b/packaging/osx/clisdk/Distribution-TemplateWithAdditionalRuntime
new file mode 100644
index 000000000..34f298981
--- /dev/null
+++ b/packaging/osx/clisdk/Distribution-TemplateWithAdditionalRuntime
@@ -0,0 +1,53 @@
+
+
+ {CLISdkBrandName} (x64)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {SharedFxComponentId}.pkg
+ {HostFxrComponentId}.pkg
+ {SharedHostComponentId}.pkg
+ {AdditionalSharedFxComponentId}.pkg
+ {AdditionalHostFxrComponentId}.pkg
+ {AdditionalSharedHostComponentId}.pkg
+ {CLISdkComponentId}.pkg
+
diff --git a/src/redist/redist.csproj b/src/redist/redist.csproj
index 21668b585..2d42bfd64 100644
--- a/src/redist/redist.csproj
+++ b/src/redist/redist.csproj
@@ -223,4 +223,21 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/test/EndToEnd/GivenDotNetUsesMSBuild.cs b/test/EndToEnd/GivenDotNetUsesMSBuild.cs
index cd45a86a6..bc32f1ab4 100644
--- a/test/EndToEnd/GivenDotNetUsesMSBuild.cs
+++ b/test/EndToEnd/GivenDotNetUsesMSBuild.cs
@@ -109,7 +109,7 @@ namespace Microsoft.DotNet.Tests.EndToEnd
.Should()
.Pass();
- new DotnetCommand()
+ new DotnetCommand(DotnetUnderTest.WithLegacyRuntime)
.WithWorkingDirectory(testProjectDirectory)
.ExecuteWithCapturedOutput(
$"-d dependency-tool-invoker -c {configuration} -f netcoreapp2.0 portable")
diff --git a/test/Microsoft.DotNet.Tools.Tests.Utilities/Commands/DependencyToolInvokerCommand.cs b/test/Microsoft.DotNet.Tools.Tests.Utilities/Commands/DependencyToolInvokerCommand.cs
index a045c8ae6..3952f6e08 100644
--- a/test/Microsoft.DotNet.Tools.Tests.Utilities/Commands/DependencyToolInvokerCommand.cs
+++ b/test/Microsoft.DotNet.Tools.Tests.Utilities/Commands/DependencyToolInvokerCommand.cs
@@ -9,6 +9,14 @@ namespace Microsoft.DotNet.Tools.Test.Utilities
{
public class DependencyToolInvokerCommand : DotnetCommand
{
+ public DependencyToolInvokerCommand() : base()
+ {
+ }
+
+ public DependencyToolInvokerCommand(string dotnetUnderTest) : base(dotnetUnderTest)
+ {
+ }
+
public CommandResult Execute(string commandName, string framework, string additionalArgs)
{
var args = $"dependency-tool-invoker {commandName} --framework {framework} {additionalArgs}";
diff --git a/test/Microsoft.DotNet.Tools.Tests.Utilities/Commands/DotnetCommand.cs b/test/Microsoft.DotNet.Tools.Tests.Utilities/Commands/DotnetCommand.cs
index 97bb41ab4..cc8651657 100644
--- a/test/Microsoft.DotNet.Tools.Tests.Utilities/Commands/DotnetCommand.cs
+++ b/test/Microsoft.DotNet.Tools.Tests.Utilities/Commands/DotnetCommand.cs
@@ -8,9 +8,13 @@ namespace Microsoft.DotNet.Tools.Test.Utilities
public class DotnetCommand : TestCommand
{
public DotnetCommand()
- : base(DotnetUnderTest.FullName)
+ : this(DotnetUnderTest.FullName)
{
+ }
+ public DotnetCommand(string dotnetUnderTest)
+ : base(dotnetUnderTest)
+ {
}
}
}
diff --git a/test/Microsoft.DotNet.Tools.Tests.Utilities/DotnetUnderTest.cs b/test/Microsoft.DotNet.Tools.Tests.Utilities/DotnetUnderTest.cs
index 865612e4f..6c6854f54 100644
--- a/test/Microsoft.DotNet.Tools.Tests.Utilities/DotnetUnderTest.cs
+++ b/test/Microsoft.DotNet.Tools.Tests.Utilities/DotnetUnderTest.cs
@@ -2,6 +2,7 @@
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
using System;
+using System.IO;
using Microsoft.DotNet.Cli.Utils;
namespace Microsoft.DotNet.Tools.Test.Utilities
@@ -22,5 +23,13 @@ namespace Microsoft.DotNet.Tools.Test.Utilities
return _pathToDotnetUnderTest;
}
}
+
+ public static string WithLegacyRuntime
+ {
+ get
+ {
+ return Path.Combine(new RepoDirectoriesProvider().Stage2WithLegacyRuntimeDirectory, "dotnet");
+ }
+ }
}
}
diff --git a/test/Microsoft.DotNet.Tools.Tests.Utilities/RepoDirectoriesProvider.cs b/test/Microsoft.DotNet.Tools.Tests.Utilities/RepoDirectoriesProvider.cs
index 94586477f..ead1ed6f4 100644
--- a/test/Microsoft.DotNet.Tools.Tests.Utilities/RepoDirectoriesProvider.cs
+++ b/test/Microsoft.DotNet.Tools.Tests.Utilities/RepoDirectoriesProvider.cs
@@ -18,6 +18,7 @@ namespace Microsoft.DotNet.Tools.Test.Utilities
private string _builtDotnet;
private string _nugetPackages;
private string _stage2Sdk;
+ private string _stage2WithLegacyRuntimeDirectory;
private string _testPackages;
private string _pjDotnet;
@@ -82,6 +83,7 @@ namespace Microsoft.DotNet.Tools.Test.Utilities
public string NugetPackages => _nugetPackages;
public string PjDotnet => _pjDotnet;
public string Stage2Sdk => _stage2Sdk;
+ public string Stage2WithLegacyRuntimeDirectory => _stage2WithLegacyRuntimeDirectory;
public string TestPackages => _testPackages;
public RepoDirectoriesProvider(
@@ -97,6 +99,7 @@ namespace Microsoft.DotNet.Tools.Test.Utilities
_nugetPackages = nugetPackages ?? Path.Combine(RepoRoot, ".nuget", "packages");
_pjDotnet = pjDotnet ?? GetPjDotnetPath();
_stage2Sdk = Directory.EnumerateDirectories(Path.Combine(_artifacts, "stage2", "sdk")).First();
+ _stage2WithLegacyRuntimeDirectory = Path.Combine(_artifacts, "stage2WithLegacyRuntime");
_testPackages = Path.Combine(RepoRoot, "artifacts", "testpackages", "packages");
}
diff --git a/test/dotnet-migrate.Tests/GivenThatIWantToMigrateDeprecatedProjects.cs b/test/dotnet-migrate.Tests/GivenThatIWantToMigrateDeprecatedProjects.cs
index 3a96e45ca..c4657ce01 100644
--- a/test/dotnet-migrate.Tests/GivenThatIWantToMigrateDeprecatedProjects.cs
+++ b/test/dotnet-migrate.Tests/GivenThatIWantToMigrateDeprecatedProjects.cs
@@ -431,13 +431,7 @@ namespace Microsoft.DotNet.Migration.Tests
.Execute("build -c Debug")
.Should().Pass();
- if (!EnvironmentInfo.HasSharedFramework("netcoreapp1.1"))
- {
- // running the app requires netcoreapp1.1
- return;
- }
-
- var cmd = new DotnetCommand()
+ var cmd = new DotnetCommand(DotnetUnderTest.WithLegacyRuntime)
.WithWorkingDirectory(projectDirectory)
.ExecuteWithCapturedOutput("run -c Debug");
cmd.Should().Pass();
@@ -454,7 +448,7 @@ namespace Microsoft.DotNet.Migration.Tests
.Root
.GetDirectory("project");
- var cmd = new DotnetCommand()
+ var cmd = new DotnetCommand(DotnetUnderTest.WithLegacyRuntime)
.WithWorkingDirectory(projectDirectory)
.ExecuteWithCapturedOutput("migrate");
@@ -489,13 +483,7 @@ namespace Microsoft.DotNet.Migration.Tests
.Execute("build -c Debug")
.Should().Pass();
- if (!EnvironmentInfo.HasSharedFramework("netcoreapp1.1"))
- {
- // running the app requires netcoreapp1.1
- return;
- }
-
- var cmd = new DotnetCommand()
+ var cmd = new DotnetCommand(DotnetUnderTest.WithLegacyRuntime)
.WithWorkingDirectory(projectDirectory)
.ExecuteWithCapturedOutput("run -c Debug");
cmd.Should().Pass();
@@ -546,13 +534,7 @@ namespace Microsoft.DotNet.Migration.Tests
.Execute("build -c Debug")
.Should().Pass();
- if (!EnvironmentInfo.HasSharedFramework("netcoreapp1.1"))
- {
- // running the app requires netcoreapp1.1
- return;
- }
-
- var cmd = new DotnetCommand()
+ var cmd = new DotnetCommand(DotnetUnderTest.WithLegacyRuntime)
.WithWorkingDirectory(projectDirectory)
.ExecuteWithCapturedOutput("run -c Debug");
cmd.Should().Pass();
diff --git a/test/dotnet-migrate.Tests/GivenThatIWantToMigrateTestApps.cs b/test/dotnet-migrate.Tests/GivenThatIWantToMigrateTestApps.cs
index 3bf859852..f1142eae5 100644
--- a/test/dotnet-migrate.Tests/GivenThatIWantToMigrateTestApps.cs
+++ b/test/dotnet-migrate.Tests/GivenThatIWantToMigrateTestApps.cs
@@ -759,7 +759,7 @@ namespace Microsoft.DotNet.Migration.Tests
foreach (var dll in runnableDlls)
{
- new TestCommand("dotnet").ExecuteWithCapturedOutput($"\"{dll.FullName}\"").Should().Pass();
+ new DotnetCommand(DotnetUnderTest.WithLegacyRuntime).ExecuteWithCapturedOutput($"\"{dll.FullName}\"").Should().Pass();
}
}
diff --git a/test/dotnet.Tests/PackagedCommandTests.cs b/test/dotnet.Tests/PackagedCommandTests.cs
index 42370e312..feec54f99 100644
--- a/test/dotnet.Tests/PackagedCommandTests.cs
+++ b/test/dotnet.Tests/PackagedCommandTests.cs
@@ -128,7 +128,7 @@ namespace Microsoft.DotNet.Tests
.Execute()
.Should().Pass();
- new DependencyToolInvokerCommand()
+ new DependencyToolInvokerCommand(DotnetUnderTest.WithLegacyRuntime)
.WithWorkingDirectory(testInstance.Root)
.WithEnvironmentVariable(CommandContext.Variables.Verbose, "true")
.ExecuteWithCapturedOutput($"tool-with-output-name", framework, "")
@@ -250,7 +250,7 @@ namespace Microsoft.DotNet.Tests
.WithSourceFiles()
.WithRestoreFiles();
- new DependencyContextTestCommand()
+ new DependencyContextTestCommand(DotnetUnderTest.WithLegacyRuntime)
.WithWorkingDirectory(testInstance.Root)
.Execute("")
.Should().Pass();
@@ -417,7 +417,7 @@ namespace Microsoft.DotNet.Tests
class DependencyContextTestCommand : DotnetCommand
{
- public DependencyContextTestCommand()
+ public DependencyContextTestCommand(string dotnetUnderTest) : base(dotnetUnderTest)
{
}