diff --git a/Directory.Build.props b/Directory.Build.props index a060aa3b00..e7328acb58 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -1,4 +1,8 @@  + + diff --git a/korebuild-lock.txt b/korebuild-lock.txt index 36d8056037..b2036f3394 100644 --- a/korebuild-lock.txt +++ b/korebuild-lock.txt @@ -1,2 +1,2 @@ -version:2.1.0-preview1-15550 -commithash:0dd080d0d87b4d1966ec0af9961dc8bacc04f84f +version:2.1.0-preview1-15569 +commithash:47312a6364ad0ee6d7052eada54da940c9b17931 diff --git a/samples/MusicStore/MusicStore.csproj b/samples/MusicStore/MusicStore.csproj index 061c48f9f4..1c7f25f925 100644 --- a/samples/MusicStore/MusicStore.csproj +++ b/samples/MusicStore/MusicStore.csproj @@ -2,7 +2,7 @@ Music store application on ASP.NET Core - netcoreapp2.0;net461 + netcoreapp2.1;netcoreapp2.0;net461 $(DefineConstants);DEMO true true diff --git a/test/Directory.Build.props b/test/Directory.Build.props index 6bb1f5a660..c46c1c57f1 100644 --- a/test/Directory.Build.props +++ b/test/Directory.Build.props @@ -1,6 +1,13 @@  + + netcoreapp2.1 + $(DeveloperBuildTestTfms) + netcoreapp2.1;netcoreapp2.0 + $(StandardTestTfms);net461 + + diff --git a/test/MusicStore.E2ETests/Common/Helpers.cs b/test/MusicStore.E2ETests/Common/Helpers.cs index d507df3bea..eb8da01c4c 100644 --- a/test/MusicStore.E2ETests/Common/Helpers.cs +++ b/test/MusicStore.E2ETests/Common/Helpers.cs @@ -39,5 +39,25 @@ namespace E2ETests return false; } } + + public static string GetTargetFramework(RuntimeFlavor flavor) + { + if (flavor == RuntimeFlavor.Clr) + { + return "net461"; + } + else if (flavor == RuntimeFlavor.CoreClr) + { +#if NETCOREAPP2_0 + return "netcoreapp2.0"; +#elif NETCOREAPP2_1 + return "netcoreapp2.1"; +#else +#error Target Frameworks need to be updated +#endif + } + + throw new ArgumentException($"Unknown runtime flavor '{flavor}."); + } } } \ No newline at end of file diff --git a/test/MusicStore.E2ETests/MusicStore.E2ETests.csproj b/test/MusicStore.E2ETests/MusicStore.E2ETests.csproj index 6ca1a3b5d3..8d60d53eac 100644 --- a/test/MusicStore.E2ETests/MusicStore.E2ETests.csproj +++ b/test/MusicStore.E2ETests/MusicStore.E2ETests.csproj @@ -1,7 +1,7 @@  - netcoreapp2.0 + netcoreapp2.1;netcoreapp2.0 MusicStore.E2ETests true true diff --git a/test/MusicStore.E2ETests/NtlmAuthentationTest.cs b/test/MusicStore.E2ETests/NtlmAuthentationTest.cs index d8701e633d..99e0b3d63c 100644 --- a/test/MusicStore.E2ETests/NtlmAuthentationTest.cs +++ b/test/MusicStore.E2ETests/NtlmAuthentationTest.cs @@ -45,6 +45,7 @@ namespace E2ETests return NtlmAuthenticationTest(ServerType.IISExpress, RuntimeFlavor.CoreClr, ApplicationType.Standalone); } +#if NETCOREAPP2_1 // Avoid running CLR based tests once on netcoreapp2.0 and netcoreapp2.1 each [ConditionalFact] public Task NtlmAuthenticationTest_WebListener_CLR() { @@ -56,6 +57,7 @@ namespace E2ETests { return NtlmAuthenticationTest(ServerType.IISExpress, RuntimeFlavor.Clr, ApplicationType.Standalone); } +#endif private async Task NtlmAuthenticationTest(ServerType serverType, RuntimeFlavor runtimeFlavor, ApplicationType applicationType) { @@ -70,7 +72,7 @@ namespace E2ETests { PublishApplicationBeforeDeployment = true, PreservePublishedApplicationForDebugging = Helpers.PreservePublishedApplicationForDebugging, - TargetFramework = runtimeFlavor == RuntimeFlavor.Clr ? "net461" : "netcoreapp2.0", + TargetFramework = Helpers.GetTargetFramework(runtimeFlavor), Configuration = Helpers.GetCurrentBuildConfiguration(), ApplicationType = applicationType, EnvironmentName = "NtlmAuthentication", //Will pick the Start class named 'StartupNtlmAuthentication' diff --git a/test/MusicStore.E2ETests/OpenIdConnectTests.cs b/test/MusicStore.E2ETests/OpenIdConnectTests.cs index c5f1b8ffc2..191a42a86b 100644 --- a/test/MusicStore.E2ETests/OpenIdConnectTests.cs +++ b/test/MusicStore.E2ETests/OpenIdConnectTests.cs @@ -50,7 +50,7 @@ namespace E2ETests { PublishApplicationBeforeDeployment = true, PreservePublishedApplicationForDebugging = Helpers.PreservePublishedApplicationForDebugging, - TargetFramework = runtimeFlavor == RuntimeFlavor.Clr ? "net461" : "netcoreapp2.0", + TargetFramework = Helpers.GetTargetFramework(runtimeFlavor), Configuration = Helpers.GetCurrentBuildConfiguration(), ApplicationType = applicationType, EnvironmentName = "OpenIdConnectTesting", diff --git a/test/MusicStore.E2ETests/PublishAndRunTestRunner.cs b/test/MusicStore.E2ETests/PublishAndRunTestRunner.cs index 2628df4eec..33abd4bb5c 100644 --- a/test/MusicStore.E2ETests/PublishAndRunTestRunner.cs +++ b/test/MusicStore.E2ETests/PublishAndRunTestRunner.cs @@ -35,7 +35,7 @@ namespace E2ETests { PublishApplicationBeforeDeployment = true, PreservePublishedApplicationForDebugging = Helpers.PreservePublishedApplicationForDebugging, - TargetFramework = runtimeFlavor == RuntimeFlavor.Clr ? "net461" : "netcoreapp2.0", + TargetFramework = Helpers.GetTargetFramework(runtimeFlavor), Configuration = Helpers.GetCurrentBuildConfiguration(), ApplicationType = applicationType, UserAdditionalCleanup = parameters => diff --git a/test/MusicStore.E2ETests/PublishAndRunTests_X86.cs b/test/MusicStore.E2ETests/PublishAndRunTests_X86.cs index 14f0a46b16..fbd7278ead 100644 --- a/test/MusicStore.E2ETests/PublishAndRunTests_X86.cs +++ b/test/MusicStore.E2ETests/PublishAndRunTests_X86.cs @@ -1,3 +1,4 @@ +#if NETCOREAPP2_1 // Avoid running CLR based tests once on netcoreapp2.0 and netcoreapp2.1 each using System.Threading.Tasks; using Microsoft.AspNetCore.Server.IntegrationTesting; using Microsoft.AspNetCore.Testing.xunit; @@ -38,3 +39,4 @@ namespace E2ETests => _testRunner.RunTests(serverType, runtimeFlavor, applicationType, RuntimeArchitecture.x86); } } +#endif \ No newline at end of file diff --git a/test/MusicStore.E2ETests/SmokeTestRunner.cs b/test/MusicStore.E2ETests/SmokeTestRunner.cs index 72a7871624..715db35066 100644 --- a/test/MusicStore.E2ETests/SmokeTestRunner.cs +++ b/test/MusicStore.E2ETests/SmokeTestRunner.cs @@ -37,7 +37,7 @@ namespace E2ETests SiteName = "MusicStoreTestSite", PublishApplicationBeforeDeployment = true, PreservePublishedApplicationForDebugging = Helpers.PreservePublishedApplicationForDebugging, - TargetFramework = runtimeFlavor == RuntimeFlavor.CoreClr ? "netcoreapp2.0" : "net461", + TargetFramework = Helpers.GetTargetFramework(runtimeFlavor), Configuration = Helpers.GetCurrentBuildConfiguration(), ApplicationType = applicationType, UserAdditionalCleanup = parameters => diff --git a/test/MusicStore.E2ETests/SmokeTestsOnNanoServer.cs b/test/MusicStore.E2ETests/SmokeTestsOnNanoServer.cs index 8984b52703..b72c1d1e7c 100644 --- a/test/MusicStore.E2ETests/SmokeTestsOnNanoServer.cs +++ b/test/MusicStore.E2ETests/SmokeTestsOnNanoServer.cs @@ -246,7 +246,7 @@ namespace E2ETests _remoteDeploymentConfig.AccountName, _remoteDeploymentConfig.AccountPassword) { - TargetFramework = "netcoreapp2.0", + TargetFramework = Helpers.GetTargetFramework(RuntimeFlavor.CoreClr), ApplicationBaseUriHint = applicationBaseUrl, ApplicationType = applicationType }; diff --git a/test/MusicStore.E2ETests/SmokeTestsUsingStore/TestHelper.cs b/test/MusicStore.E2ETests/SmokeTestsUsingStore/TestHelper.cs index ed563dd220..d0ad3de500 100644 --- a/test/MusicStore.E2ETests/SmokeTestsUsingStore/TestHelper.cs +++ b/test/MusicStore.E2ETests/SmokeTestsUsingStore/TestHelper.cs @@ -22,7 +22,7 @@ namespace E2ETests.SmokeTestsUsingStore public async Task SmokeTestSuite(ServerType serverType) { - var targetFramework = "netcoreapp2.0"; + var targetFramework = Helpers.GetTargetFramework(RuntimeFlavor.CoreClr); var testName = $"SmokeTestsUsingStore_{serverType}"; using (StartLog(out var loggerFactory, testName)) { diff --git a/test/MusicStore.Test/MusicStore.Test.csproj b/test/MusicStore.Test/MusicStore.Test.csproj index 81246dd544..ca4c333468 100644 --- a/test/MusicStore.Test/MusicStore.Test.csproj +++ b/test/MusicStore.Test/MusicStore.Test.csproj @@ -1,7 +1,7 @@  - netcoreapp2.0 + netcoreapp2.1