Merge branch 'release/2.2.1xx' into merges/release/2.1.4xx-to-release/2.2.1xx
This commit is contained in:
commit
d71eb98fde
120 changed files with 435 additions and 442 deletions
|
@ -18,7 +18,7 @@ namespace EndToEnd
|
|||
|
||||
private const string PinnedAspNetCoreImplicitVersion = "2.1.1";
|
||||
|
||||
[Fact]
|
||||
[Fact(Skip="https://github.com/dotnet/cli/issues/9687")]
|
||||
public void PortablePublishWithLatestTFMUsesPinnedDownAspNetCoreAppVersion()
|
||||
{
|
||||
var _testInstance = TestAssets.Get(AspNetTestProject)
|
||||
|
@ -208,7 +208,7 @@ namespace EndToEnd
|
|||
?.Version;
|
||||
}
|
||||
|
||||
public static string LatestSupportedAspNetCoreAppVersion = "2.1";
|
||||
public static string LatestSupportedAspNetCoreAppVersion = "2.2";
|
||||
|
||||
public static IEnumerable<object[]> SupportedAspNetCoreAppVersions
|
||||
{
|
||||
|
|
|
@ -72,7 +72,7 @@ namespace Microsoft.DotNet.Tests.EndToEnd
|
|||
.HaveStdOutContaining("Hello Portable World!");;
|
||||
}
|
||||
|
||||
[Fact]
|
||||
[Fact(Skip="https://github.com/dotnet/cli/issues/9688")]
|
||||
public void ItCanRunToolsThatPrefersTheCliRuntimeEvenWhenTheToolItselfDeclaresADifferentRuntime()
|
||||
{
|
||||
var testInstance = TestAssets.Get("MSBuildTestApp")
|
||||
|
@ -89,7 +89,7 @@ namespace Microsoft.DotNet.Tests.EndToEnd
|
|||
.And.HaveStdOutContaining("Hello I prefer the cli runtime World!");;
|
||||
}
|
||||
|
||||
[Fact]
|
||||
[Fact(Skip="https://github.com/dotnet/cli/issues/9688")]
|
||||
public void ItCanRunAToolThatInvokesADependencyToolInACSProj()
|
||||
{
|
||||
var repoDirectoriesProvider = new RepoDirectoriesProvider();
|
||||
|
@ -112,7 +112,7 @@ namespace Microsoft.DotNet.Tests.EndToEnd
|
|||
new DotnetCommand(DotnetUnderTest.WithBackwardsCompatibleRuntimes)
|
||||
.WithWorkingDirectory(testProjectDirectory)
|
||||
.ExecuteWithCapturedOutput(
|
||||
$"-d dependency-tool-invoker -c {configuration} -f netcoreapp2.1 portable")
|
||||
$"-d dependency-tool-invoker -c {configuration} -f netcoreapp2.2 portable")
|
||||
.Should().Pass()
|
||||
.And.HaveStdOutContaining("Hello Portable World!");;
|
||||
}
|
||||
|
|
|
@ -21,6 +21,13 @@ namespace EndToEnd
|
|||
[ClassData(typeof(SupportedNetCoreAppVersions))]
|
||||
public void ItRollsForwardToTheLatestVersion(string minorVersion)
|
||||
{
|
||||
// https://github.com/dotnet/cli/issues/9661: remove this once the ASP.NET version bump
|
||||
// merges from 2.1.3xx -> 2.1.4xx -> 2.2.1xx
|
||||
if (minorVersion == "2.1")
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
var _testInstance = TestAssets.Get("TestAppSimple")
|
||||
.CreateInstance(identifier: minorVersion)
|
||||
.WithSourceFiles();
|
||||
|
|
|
@ -190,7 +190,7 @@ namespace Microsoft.DotNet.Cli.Utils.Tests
|
|||
.Should().Pass();
|
||||
|
||||
var factory = new ProjectDependenciesCommandFactory(
|
||||
NuGetFrameworks.NetCoreApp21,
|
||||
NuGetFrameworks.NetCoreApp22,
|
||||
configuration,
|
||||
null,
|
||||
null,
|
||||
|
@ -199,7 +199,7 @@ namespace Microsoft.DotNet.Cli.Utils.Tests
|
|||
var command = factory.Create("dotnet-tool-with-output-name", null);
|
||||
|
||||
command.CommandArgs.Should().Contain(
|
||||
Path.Combine("toolwithoutputname", "1.0.0", "lib", "netcoreapp2.1", "dotnet-tool-with-output-name.dll"));
|
||||
Path.Combine("toolwithoutputname", "1.0.0", "lib", "netcoreapp2.2", "dotnet-tool-with-output-name.dll"));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -48,7 +48,7 @@ namespace Microsoft.DotNet.Cli.Utils.Tests
|
|||
CommandName = "dotnet-portable",
|
||||
Configuration = "Debug",
|
||||
ProjectDirectory = MSBuildTestProjectInstance.Root.FullName,
|
||||
Framework = NuGetFrameworks.NetCoreApp21
|
||||
Framework = NuGetFrameworks.NetCoreApp22
|
||||
};
|
||||
|
||||
var result = projectDependenciesCommandResolver.Resolve(commandResolverArguments);
|
||||
|
@ -84,7 +84,7 @@ namespace Microsoft.DotNet.Cli.Utils.Tests
|
|||
CommandName = "dotnet-portable",
|
||||
Configuration = "Debug",
|
||||
ProjectDirectory = MSBuildTestProjectInstance.Root.FullName,
|
||||
Framework = NuGetFrameworks.NetCoreApp21
|
||||
Framework = NuGetFrameworks.NetCoreApp22
|
||||
};
|
||||
|
||||
var result = projectDependenciesCommandResolver.Resolve(commandResolverArguments);
|
||||
|
@ -110,7 +110,7 @@ namespace Microsoft.DotNet.Cli.Utils.Tests
|
|||
CommandName = "nonexistent-command",
|
||||
CommandArguments = null,
|
||||
ProjectDirectory = MSBuildTestProjectInstance.Root.FullName,
|
||||
Framework = NuGetFrameworks.NetCoreApp21
|
||||
Framework = NuGetFrameworks.NetCoreApp22
|
||||
};
|
||||
|
||||
var result = projectDependenciesCommandResolver.Resolve(commandResolverArguments);
|
||||
|
@ -136,7 +136,7 @@ namespace Microsoft.DotNet.Cli.Utils.Tests
|
|||
CommandName = "dotnet-portable",
|
||||
Configuration = "Debug",
|
||||
ProjectDirectory = testInstance.Root.FullName,
|
||||
Framework = NuGetFrameworks.NetCoreApp21,
|
||||
Framework = NuGetFrameworks.NetCoreApp22,
|
||||
OutputPath = outputDir.FullName
|
||||
};
|
||||
|
||||
|
|
|
@ -19,7 +19,7 @@ namespace Microsoft.DotNet.Tests
|
|||
public class GivenAProjectToolsCommandResolver : TestBase
|
||||
{
|
||||
private static readonly NuGetFramework s_toolPackageFramework =
|
||||
NuGetFrameworks.NetCoreApp21;
|
||||
NuGetFrameworks.NetCoreApp22;
|
||||
|
||||
private const string TestProjectName = "AppWithToolDependency";
|
||||
|
||||
|
@ -304,7 +304,7 @@ namespace Microsoft.DotNet.Tests
|
|||
|
||||
result.Should().NotBeNull();
|
||||
|
||||
result.Args.Should().Contain("--fx-version 2.1.2");
|
||||
result.Args.Should().Contain("--fx-version 2.2.0");
|
||||
}
|
||||
|
||||
[Fact]
|
||||
|
@ -370,7 +370,7 @@ namespace Microsoft.DotNet.Tests
|
|||
"dotnet-fallbackfoldertool",
|
||||
"1.0.0",
|
||||
"lib",
|
||||
"netcoreapp2.1",
|
||||
"netcoreapp2.2",
|
||||
"dotnet-fallbackfoldertool.dll"));
|
||||
}
|
||||
|
||||
|
|
|
@ -10,5 +10,8 @@ namespace Microsoft.DotNet.Tools.Tests.Utilities
|
|||
{
|
||||
public static readonly NuGetFramework NetCoreApp21
|
||||
= new NuGetFramework(FrameworkConstants.FrameworkIdentifiers.NetCoreApp, new Version(2, 1, 0, 0));
|
||||
|
||||
public static readonly NuGetFramework NetCoreApp22
|
||||
= new NuGetFramework(FrameworkConstants.FrameworkIdentifiers.NetCoreApp, new Version(2, 2, 0, 0));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -107,7 +107,7 @@ namespace Microsoft.DotNet.Cli.Package.Add.Tests
|
|||
|
||||
var packageName = "Newtonsoft.Json";
|
||||
var packageVersion = "9.0.1";
|
||||
var framework = "netcoreapp2.1";
|
||||
var framework = "netcoreapp2.2";
|
||||
var cmd = new DotnetCommand()
|
||||
.WithWorkingDirectory(projectDirectory)
|
||||
.ExecuteWithCapturedOutput($"add package {packageName} --version {packageVersion} --framework {framework}");
|
||||
|
|
|
@ -29,7 +29,7 @@ namespace Microsoft.DotNet.Cli.Build.Tests
|
|||
|
||||
var configuration = Environment.GetEnvironmentVariable("CONFIGURATION") ?? "Debug";
|
||||
|
||||
var outputDll = testInstance.Root.GetDirectory("bin", configuration, "netcoreapp2.1")
|
||||
var outputDll = testInstance.Root.GetDirectory("bin", configuration, "netcoreapp2.2")
|
||||
.GetFile($"{testAppName}.dll");
|
||||
|
||||
var outputRunCommand = new DotnetCommand();
|
||||
|
@ -66,7 +66,7 @@ namespace Microsoft.DotNet.Cli.Build.Tests
|
|||
|
||||
new BuildCommand()
|
||||
.WithWorkingDirectory(projectDirectory)
|
||||
.Execute("--framework netcoreapp2.1")
|
||||
.Execute("--framework netcoreapp2.2")
|
||||
.Should().Pass();
|
||||
}
|
||||
|
||||
|
|
|
@ -28,7 +28,7 @@ namespace Microsoft.DotNet.Cli.Clean.Tests
|
|||
.Should().Pass();
|
||||
|
||||
var configuration = Environment.GetEnvironmentVariable("CONFIGURATION") ?? "Debug";
|
||||
var outputFolder = testInstance.Root.GetDirectory("bin", configuration, "netcoreapp2.1", "win7-x64");
|
||||
var outputFolder = testInstance.Root.GetDirectory("bin", configuration, "netcoreapp2.2", "win7-x64");
|
||||
|
||||
outputFolder.Should().NotBeEmpty();
|
||||
|
||||
|
|
|
@ -74,15 +74,16 @@ namespace Microsoft.DotNet.New.Tests
|
|||
.Should().Pass();
|
||||
}
|
||||
|
||||
// Remove the expectedVersion parameter once we have templates targetting netcoreapp2.2.
|
||||
[Theory]
|
||||
// [InlineData("console", "microsoft.netcore.app")] re-enable when this issue is resolved: "https://github.com/dotnet/cli/issues/9420"
|
||||
[InlineData("classlib", "netstandard.library")]
|
||||
public void NewProjectRestoresCorrectPackageVersion(string type, string packageName)
|
||||
[InlineData("console", "microsoft.netcore.app", "2.1.0")]
|
||||
[InlineData("classlib", "netstandard.library", null)]
|
||||
public void NewProjectRestoresCorrectPackageVersion(string type, string packageName, string expectedVersion)
|
||||
{
|
||||
var rootPath = TestAssets.CreateTestDirectory(identifier: $"_{type}").FullName;
|
||||
var packagesDirectory = Path.Combine(rootPath, "packages");
|
||||
var projectName = "Project";
|
||||
var expectedVersion = GetFrameworkPackageVersion();
|
||||
expectedVersion = expectedVersion ?? GetFrameworkPackageVersion();
|
||||
|
||||
var repoRootNuGetConfig = Path.Combine(RepoDirectoriesProvider.RepoRoot, "NuGet.Config");
|
||||
|
||||
|
@ -106,7 +107,7 @@ namespace Microsoft.DotNet.New.Tests
|
|||
var sharedFxDir = dotnetDir
|
||||
.GetDirectory("shared", "Microsoft.NETCore.App")
|
||||
.EnumerateDirectories()
|
||||
.Single(d => d.Name.StartsWith("2.1.2"));
|
||||
.Single(d => d.Name.StartsWith("2.2.0"));
|
||||
|
||||
if (packageName == "microsoft.netcore.app")
|
||||
{
|
||||
|
|
|
@ -34,11 +34,11 @@ namespace Microsoft.DotNet.Cli.Publish.Tests
|
|||
|
||||
new PublishCommand()
|
||||
.WithWorkingDirectory(testProjectDirectory)
|
||||
.Execute("--framework netcoreapp2.1")
|
||||
.Execute("--framework netcoreapp2.2")
|
||||
.Should().Pass();
|
||||
|
||||
var configuration = Environment.GetEnvironmentVariable("CONFIGURATION") ?? "Debug";
|
||||
var outputDll = Path.Combine(testProjectDirectory, "bin", configuration, "netcoreapp2.1", "publish", $"{testAppName}.dll");
|
||||
var outputDll = Path.Combine(testProjectDirectory, "bin", configuration, "netcoreapp2.2", "publish", $"{testAppName}.dll");
|
||||
|
||||
new DotnetCommand()
|
||||
.ExecuteWithCapturedOutput(outputDll)
|
||||
|
@ -58,7 +58,7 @@ namespace Microsoft.DotNet.Cli.Publish.Tests
|
|||
|
||||
new PublishCommand()
|
||||
.WithWorkingDirectory(testProjectDirectory)
|
||||
.Execute("--framework netcoreapp2.1")
|
||||
.Execute("--framework netcoreapp2.2")
|
||||
.Should().Pass();
|
||||
}
|
||||
|
||||
|
@ -75,7 +75,7 @@ namespace Microsoft.DotNet.Cli.Publish.Tests
|
|||
|
||||
new PublishCommand()
|
||||
.WithWorkingDirectory(projectDirectory)
|
||||
.Execute("--framework netcoreapp2.1")
|
||||
.Execute("--framework netcoreapp2.2")
|
||||
.Should().Pass();
|
||||
}
|
||||
|
||||
|
@ -91,7 +91,7 @@ namespace Microsoft.DotNet.Cli.Publish.Tests
|
|||
|
||||
new PublishCommand()
|
||||
.WithWorkingDirectory(testProjectDirectory)
|
||||
.ExecuteWithCapturedOutput("--framework netcoreapp2.1 --no-restore")
|
||||
.ExecuteWithCapturedOutput("--framework netcoreapp2.2 --no-restore")
|
||||
.Should().Fail()
|
||||
.And.HaveStdOutContaining("project.assets.json");
|
||||
}
|
||||
|
@ -175,7 +175,7 @@ namespace Microsoft.DotNet.Cli.Publish.Tests
|
|||
|
||||
var configuration = Environment.GetEnvironmentVariable("CONFIGURATION") ?? "Debug";
|
||||
return testProjectDirectory
|
||||
.GetDirectory("bin", configuration, "netcoreapp2.1", rid ?? "", "publish");
|
||||
.GetDirectory("bin", configuration, "netcoreapp2.2", rid ?? "", "publish");
|
||||
}
|
||||
|
||||
[Fact]
|
||||
|
|
|
@ -70,7 +70,7 @@ namespace Microsoft.DotNet.Cli.Run.Tests
|
|||
|
||||
new RunCommand()
|
||||
.WithWorkingDirectory(projectDirectory)
|
||||
.ExecuteWithCapturedOutput("--framework netcoreapp2.1")
|
||||
.ExecuteWithCapturedOutput("--framework netcoreapp2.2")
|
||||
.Should().Pass()
|
||||
.And.HaveStdOutContaining("This string came from the test library!");
|
||||
}
|
||||
|
@ -150,7 +150,7 @@ namespace Microsoft.DotNet.Cli.Run.Tests
|
|||
|
||||
new RunCommand()
|
||||
.WithWorkingDirectory(testProjectDirectory)
|
||||
.ExecuteWithCapturedOutput("--framework netcoreapp2.1")
|
||||
.ExecuteWithCapturedOutput("--framework netcoreapp2.2")
|
||||
.Should().Pass()
|
||||
.And.HaveStdOut("Hello World!");
|
||||
}
|
||||
|
|
|
@ -13,7 +13,7 @@ namespace Microsoft.DotNet.Cli.Publish.Tests
|
|||
{
|
||||
public class GivenDotnetStoresAndPublishesProjects : TestBase
|
||||
{
|
||||
private static string _tfm = "netcoreapp2.1";
|
||||
private static string _tfm = "netcoreapp2.2";
|
||||
private static string _frameworkVersion = TestAssetInstance.CurrentRuntimeFrameworkVersion;
|
||||
private static string _arch = RuntimeEnvironment.RuntimeArchitecture.ToLowerInvariant();
|
||||
|
||||
|
|
|
@ -127,7 +127,7 @@ namespace Microsoft.DotNet.Cli.Test.Tests
|
|||
|
||||
new DotnetTestCommand()
|
||||
.WithWorkingDirectory(projectDirectory)
|
||||
.ExecuteWithCapturedOutput($"{TestBase.ConsoleLoggerOutputNormal} --framework netcoreapp2.1")
|
||||
.ExecuteWithCapturedOutput($"{TestBase.ConsoleLoggerOutputNormal} --framework netcoreapp2.2")
|
||||
.Should().Pass();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -172,7 +172,7 @@ namespace Microsoft.DotNet.Cli.Test.Tests
|
|||
var testProjectDirectory = this.CopyAndRestoreVSTestDotNetCoreTestApp("5");
|
||||
string configuration = Environment.GetEnvironmentVariable("CONFIGURATION") ?? "Debug";
|
||||
string expectedError = Path.Combine(testProjectDirectory, "bin",
|
||||
configuration, "netcoreapp2.1", "VSTestCore.dll");
|
||||
configuration, "netcoreapp2.2", "VSTestCore.dll");
|
||||
expectedError = "The test source file " + "\"" + expectedError + "\"" + " provided was not found.";
|
||||
|
||||
// Call test
|
||||
|
|
|
@ -31,7 +31,7 @@ namespace Microsoft.DotNet.Cli.VSTest.Tests
|
|||
.Should().Pass();
|
||||
|
||||
var outputDll = testRoot
|
||||
.GetDirectory("bin", configuration, "netcoreapp2.1")
|
||||
.GetDirectory("bin", configuration, "netcoreapp2.2")
|
||||
.GetFile($"{testAppName}.dll");
|
||||
|
||||
var argsForVstest = $"\"{outputDll.FullName}\" --logger:console;verbosity=normal";
|
||||
|
|
|
@ -57,7 +57,7 @@ namespace Microsoft.DotNet.Tests
|
|||
_testInstance.Root.FullName,
|
||||
"bin",
|
||||
configuration,
|
||||
"netcoreapp2.1",
|
||||
"netcoreapp2.2",
|
||||
"publish",
|
||||
"VBTestApp.dll");
|
||||
|
||||
|
|
|
@ -239,7 +239,7 @@ namespace Microsoft.DotNet.Tests
|
|||
.And.Pass();
|
||||
}
|
||||
|
||||
[Fact]
|
||||
[Fact(Skip="https://github.com/dotnet/cli/issues/9688")]
|
||||
public void CanInvokeToolFromDirectDependenciesIfPackageNameDifferentFromToolName()
|
||||
{
|
||||
var testInstance = TestAssets.Get("AppWithDirectDepWithOutputName")
|
||||
|
@ -247,7 +247,7 @@ namespace Microsoft.DotNet.Tests
|
|||
.WithSourceFiles()
|
||||
.WithRestoreFiles();
|
||||
|
||||
string framework = Tools.Tests.Utilities.NuGetFrameworks.NetCoreApp21.DotNetFrameworkName;
|
||||
string framework = Tools.Tests.Utilities.NuGetFrameworks.NetCoreApp22.DotNetFrameworkName;
|
||||
|
||||
new BuildCommand()
|
||||
.WithProjectDirectory(testInstance.Root)
|
||||
|
@ -369,7 +369,7 @@ namespace Microsoft.DotNet.Tests
|
|||
.Should().Fail();
|
||||
}
|
||||
|
||||
[Fact]
|
||||
[Fact(Skip="https://github.com/dotnet/cli/issues/9688")]
|
||||
public void ToolsCanAccessDependencyContextProperly()
|
||||
{
|
||||
var testInstance = TestAssets.Get("DependencyContextFromTool")
|
||||
|
@ -423,7 +423,7 @@ namespace Microsoft.DotNet.Tests
|
|||
.WithRestoreFiles();
|
||||
|
||||
var assetsFile = new DirectoryInfo(new RepoDirectoriesProvider().NugetPackages)
|
||||
.GetDirectory(".tools", "dotnet-portable", "1.0.0", "netcoreapp2.1")
|
||||
.GetDirectory(".tools", "dotnet-portable", "1.0.0", "netcoreapp2.2")
|
||||
.GetFile("project.assets.json");
|
||||
|
||||
var stopWatch = Stopwatch.StartNew();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue