diff --git a/Directory.Build.props b/Directory.Build.props index b26fc65eda..e77f9ea343 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -1,4 +1,8 @@  + + diff --git a/build/dependencies.props b/build/dependencies.props index 4293443508..4f3582b6d8 100644 --- a/build/dependencies.props +++ b/build/dependencies.props @@ -5,29 +5,29 @@ 2.1.0-preview1-15549 2.1.1 - 2.1.0-preview1-27488 - 2.1.0-preview1-27488 - 2.1.0-preview1-27488 - 2.1.0-preview1-27488 - 2.1.0-preview1-27488 - 2.1.0-preview1-27488 - 2.1.0-preview1-27488 - 0.5.0-preview1-27488 - 2.1.0-preview1-27488 - 2.1.0-preview1-27488 + 2.1.0-preview1-27579 + 2.1.0-preview1-27579 + 2.1.0-preview1-27579 + 2.1.0-preview1-27579 + 2.1.0-preview1-27579 + 2.1.0-preview1-27579 + 2.1.0-preview1-27579 + 0.5.0-preview1-27579 + 2.1.0-preview1-27579 + 2.1.0-preview1-27579 1.1.3 1.0.0-preview - 2.1.0-preview1-27488 - 2.1.0-preview1-27488 - 2.1.0-preview1-27488 - 2.1.0-preview1-27488 - 2.1.0-preview1-27488 - 2.1.0-preview1-27488 - 2.1.0-preview1-27488 - 2.1.0-preview1-27488 - 2.1.0-preview1-27488 - 2.1.0-preview1-27488 - 2.1.0-preview1-27488 + 2.1.0-preview1-27579 + 2.1.0-preview1-27579 + 2.1.0-preview1-27579 + 2.1.0-preview1-27579 + 2.1.0-preview1-27579 + 2.1.0-preview1-27579 + 2.1.0-preview1-27579 + 2.1.0-preview1-27579 + 2.1.0-preview1-27579 + 2.1.0-preview1-27579 + 2.1.0-preview1-27579 2.0.0 15.3.0 1.4.0 diff --git a/korebuild-lock.txt b/korebuild-lock.txt index 45463cc71e..95f4613014 100644 --- a/korebuild-lock.txt +++ b/korebuild-lock.txt @@ -1,2 +1,2 @@ -version:2.1.0-preview1-15549 -commithash:f570e08585fec510dd60cd4bfe8795388b757a95 +version:2.1.0-preview1-15567 +commithash:903e3104807b1bb8cddd28bdef205b1e2dc021d1 diff --git a/sample/ApplicationInsightsHostingStartupSample/ApplicationInsightsHostingStartupSample.csproj b/sample/ApplicationInsightsHostingStartupSample/ApplicationInsightsHostingStartupSample.csproj index f550ec9e65..bf8548b179 100644 --- a/sample/ApplicationInsightsHostingStartupSample/ApplicationInsightsHostingStartupSample.csproj +++ b/sample/ApplicationInsightsHostingStartupSample/ApplicationInsightsHostingStartupSample.csproj @@ -1,7 +1,7 @@  - netcoreapp2.0;net461 + netcoreapp2.1;netcoreapp2.0;net461 win7-x86;win7-x64;linux-x64;osx-x64 diff --git a/sample/AzureAppServicesHostingStartupSample/AzureAppServicesHostingStartupSample.csproj b/sample/AzureAppServicesHostingStartupSample/AzureAppServicesHostingStartupSample.csproj index b81d43ba36..02512aaff6 100644 --- a/sample/AzureAppServicesHostingStartupSample/AzureAppServicesHostingStartupSample.csproj +++ b/sample/AzureAppServicesHostingStartupSample/AzureAppServicesHostingStartupSample.csproj @@ -1,7 +1,7 @@  - netcoreapp2.0;net461 + netcoreapp2.1;net461 diff --git a/sample/AzureAppServicesSample/AzureAppServicesSample.csproj b/sample/AzureAppServicesSample/AzureAppServicesSample.csproj index bf26916c8d..ef66ac77d1 100644 --- a/sample/AzureAppServicesSample/AzureAppServicesSample.csproj +++ b/sample/AzureAppServicesSample/AzureAppServicesSample.csproj @@ -1,7 +1,7 @@  - netcoreapp2.0;net461 + netcoreapp2.1;net461 diff --git a/src/Microsoft.AspNetCore.ApplicationInsights.HostingStartup/Microsoft.AspNetCore.ApplicationInsights.HostingStartup.csproj b/src/Microsoft.AspNetCore.ApplicationInsights.HostingStartup/Microsoft.AspNetCore.ApplicationInsights.HostingStartup.csproj index 6b58d9cb65..a5d6941581 100644 --- a/src/Microsoft.AspNetCore.ApplicationInsights.HostingStartup/Microsoft.AspNetCore.ApplicationInsights.HostingStartup.csproj +++ b/src/Microsoft.AspNetCore.ApplicationInsights.HostingStartup/Microsoft.AspNetCore.ApplicationInsights.HostingStartup.csproj @@ -4,7 +4,7 @@ ASP.NET Core lightup integration with Application Insights. - netcoreapp2.0;net461 + netcoreapp2.1;netcoreapp2.0;net461 true aspnetcore;ApplicationInsights;Analytics;Telemetry;AppInsights diff --git a/src/Microsoft.AspNetCore.AzureAppServices.HostingStartup/Microsoft.AspNetCore.AzureAppServices.HostingStartup.csproj b/src/Microsoft.AspNetCore.AzureAppServices.HostingStartup/Microsoft.AspNetCore.AzureAppServices.HostingStartup.csproj index f0d2f78fa0..8d40863573 100644 --- a/src/Microsoft.AspNetCore.AzureAppServices.HostingStartup/Microsoft.AspNetCore.AzureAppServices.HostingStartup.csproj +++ b/src/Microsoft.AspNetCore.AzureAppServices.HostingStartup/Microsoft.AspNetCore.AzureAppServices.HostingStartup.csproj @@ -4,7 +4,7 @@ ASP.NET Core lightup integration with Azure AppServices. - netcoreapp2.0;net461 + netcoreapp2.1;netcoreapp2.0;net461 true aspnetcore;azure;appservices diff --git a/test/ApplicationInsights.HostingStartup.Tests/ApplicationInsights.HostingStartup.Tests.csproj b/test/ApplicationInsights.HostingStartup.Tests/ApplicationInsights.HostingStartup.Tests.csproj index 9b5a7f685d..7926ac5ecd 100644 --- a/test/ApplicationInsights.HostingStartup.Tests/ApplicationInsights.HostingStartup.Tests.csproj +++ b/test/ApplicationInsights.HostingStartup.Tests/ApplicationInsights.HostingStartup.Tests.csproj @@ -1,8 +1,7 @@  - netcoreapp2.0;net461 - netcoreapp2.0 + netcoreapp2.1 diff --git a/test/ApplicationInsights.HostingStartup.Tests/JavaScriptSnippetTest.cs b/test/ApplicationInsights.HostingStartup.Tests/JavaScriptSnippetTest.cs index 32e90cd29b..087c4b9c8e 100644 --- a/test/ApplicationInsights.HostingStartup.Tests/JavaScriptSnippetTest.cs +++ b/test/ApplicationInsights.HostingStartup.Tests/JavaScriptSnippetTest.cs @@ -17,15 +17,19 @@ namespace ApplicationInsightsJavaScriptSnippetTest { } - [Theory] - [InlineData(ApplicationType.Portable)] - [InlineData(ApplicationType.Standalone)] - public async Task ScriptInjected(ApplicationType applicationType) - { - await JavaScriptSnippetInjectionTestSuite(applicationType); - } + [Fact] + public Task ScriptIsInjected_ForNetCoreApp20_Standalone() => JavaScriptSnippetInjectionTestSuite("netcoreapp2.0", ApplicationType.Standalone); - private async Task JavaScriptSnippetInjectionTestSuite(ApplicationType applicationType) + [Fact] + public Task ScriptIsInjected_ForNetCoreApp20_Portable() => JavaScriptSnippetInjectionTestSuite("netcoreapp2.0", ApplicationType.Portable); + + [Fact] + public Task ScriptIsInjected_ForNetCoreApp21_Standalone() => JavaScriptSnippetInjectionTestSuite("netcoreapp2.1", ApplicationType.Standalone); + + [Fact] + public Task ScriptIsInjected_ForNetCoreApp21_Portable() => JavaScriptSnippetInjectionTestSuite("netcoreapp2.1", ApplicationType.Portable); + + private async Task JavaScriptSnippetInjectionTestSuite(string targetFramework, ApplicationType applicationType) { var testName = $"ApplicationInsightsJavaScriptSnippetTest_{applicationType}"; using (StartLog(out var loggerFactory, testName)) @@ -35,7 +39,7 @@ namespace ApplicationInsightsJavaScriptSnippetTest { PublishApplicationBeforeDeployment = true, PreservePublishedApplicationForDebugging = PreservePublishedApplicationForDebugging, - TargetFramework = "netcoreapp2.0", + TargetFramework = targetFramework, Configuration = GetCurrentBuildConfiguration(), ApplicationType = applicationType, EnvironmentName = "JavaScript", diff --git a/test/ApplicationInsights.HostingStartup.Tests/LoggingTest.cs b/test/ApplicationInsights.HostingStartup.Tests/LoggingTest.cs index 7ead62becb..348e072fd4 100644 --- a/test/ApplicationInsights.HostingStartup.Tests/LoggingTest.cs +++ b/test/ApplicationInsights.HostingStartup.Tests/LoggingTest.cs @@ -17,26 +17,22 @@ namespace ApplicationInsightsJavaScriptSnippetTest { } - [Theory] - [InlineData(ApplicationType.Portable)] - [InlineData(ApplicationType.Standalone)] - public async Task DefaultAILogFiltersApplied(ApplicationType applicationType) - { - var responseText = await RunRequest(applicationType, "DefaultLogging"); - AssertDefaultLogs(responseText); - } + [Fact] + public Task DefaultAILogFiltersApplied_ForNetCoreApp20_Portable() => DefaultAILogFiltersApplied("netcoreapp2.0", ApplicationType.Portable); - [Theory] - [InlineData(ApplicationType.Portable)] - [InlineData(ApplicationType.Standalone)] - public async Task CustomAILogFiltersApplied(ApplicationType applicationType) - { - var responseText = await RunRequest(applicationType, "CustomLogging"); - AssertCustomLogs(responseText); - } + [Fact] + public Task DefaultAILogFiltersApplied_ForNetCoreApp20_Standalone() => DefaultAILogFiltersApplied("netcoreapp2.0", ApplicationType.Standalone); - private static void AssertDefaultLogs(string responseText) + [Fact] + public Task DefaultAILogFiltersApplied_ForNetCoreApp21_Portable() => DefaultAILogFiltersApplied("netcoreapp2.1", ApplicationType.Portable); + + [Fact] + public Task DefaultAILogFiltersApplied_ForNetCoreApp21_Standalone() => DefaultAILogFiltersApplied("netcoreapp2.1", ApplicationType.Standalone); + + private async Task DefaultAILogFiltersApplied(string targetFramework, ApplicationType applicationType) { + var responseText = await RunRequest(targetFramework, applicationType, "DefaultLogging"); + // Enabled by default Assert.Contains("System warning log", responseText); // Disabled by default @@ -66,8 +62,21 @@ namespace ApplicationInsightsJavaScriptSnippetTest Assert.Contains("Specific trace log", responseText); } - private static void AssertCustomLogs(string responseText) + [Fact] + public Task CustomAILogFiltersApplied_ForNetCoreApp20_Portable() => CustomAILogFiltersApplied("netcoreapp2.0", ApplicationType.Portable); + + [Fact] + public Task CustomAILogFiltersApplied_ForNetCoreApp20_Standalone() => CustomAILogFiltersApplied("netcoreapp2.0", ApplicationType.Standalone); + + [Fact] + public Task CustomAILogFiltersApplied_ForNetCoreApp21_Portable() => CustomAILogFiltersApplied("netcoreapp2.1", ApplicationType.Portable); + + [Fact] + public Task CustomAILogFiltersApplied_ForNetCoreApp21_Standalone() => CustomAILogFiltersApplied("netcoreapp2.1", ApplicationType.Standalone); + + private async Task CustomAILogFiltersApplied(string targetFramework, ApplicationType applicationType) { + var responseText = await RunRequest(targetFramework, applicationType, "CustomLogging"); // Custom logger allows only namespaces with 'o' in the name Assert.DoesNotContain("System warning log", responseText); @@ -90,7 +99,7 @@ namespace ApplicationInsightsJavaScriptSnippetTest Assert.DoesNotContain("Specific trace log", responseText); } - private async Task RunRequest(ApplicationType applicationType, string environment) + private async Task RunRequest(string targetFramework, ApplicationType applicationType, string environment) { string responseText; var testName = $"ApplicationInsightsLoggingTest_{applicationType}"; diff --git a/test/Directory.Build.props b/test/Directory.Build.props index ea16aae9bf..a7f3c3cd79 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/Microsoft.AspNetCore.AzureAppServicesIntegration.Tests/Microsoft.AspNetCore.AzureAppServicesIntegration.Tests.csproj b/test/Microsoft.AspNetCore.AzureAppServicesIntegration.Tests/Microsoft.AspNetCore.AzureAppServicesIntegration.Tests.csproj index 1e1ce7e7fd..424386bd43 100644 --- a/test/Microsoft.AspNetCore.AzureAppServicesIntegration.Tests/Microsoft.AspNetCore.AzureAppServicesIntegration.Tests.csproj +++ b/test/Microsoft.AspNetCore.AzureAppServicesIntegration.Tests/Microsoft.AspNetCore.AzureAppServicesIntegration.Tests.csproj @@ -1,8 +1,7 @@  - netcoreapp2.0;net461 - netcoreapp2.0 + $(StandardTestTfms)