diff --git a/.github/workflows/build-and-test-BASE.yml b/.github/workflows/build-and-test-BASE.yml
index ccab0420a4..b0b07cda96 100644
--- a/.github/workflows/build-and-test-BASE.yml
+++ b/.github/workflows/build-and-test-BASE.yml
@@ -24,7 +24,7 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest]
- framework: [net452, net462, net472, net480, net481, netcoreapp3.1, net6.0, net7.0, net8.0]
+ framework: [net462, net472, net480, net481, net6.0, net7.0, net8.0]
include:
- os: ubuntu-latest
args: "--filter TestCategory!=WindowsOnly"
@@ -36,7 +36,6 @@ jobs:
uses: actions/setup-dotnet@v4.0.0
with:
dotnet-version: |
- 3.1.x
6.0.x
7.0.x
8.0.x
diff --git a/.github/workflows/build-and-test-LOGGING.yml b/.github/workflows/build-and-test-LOGGING.yml
index 9ce794e976..11048796c6 100644
--- a/.github/workflows/build-and-test-LOGGING.yml
+++ b/.github/workflows/build-and-test-LOGGING.yml
@@ -24,7 +24,7 @@ jobs:
fail-fast: false
matrix:
os: [windows-latest]
- framework: [net452, net462, net472, net480, net481, netcoreapp3.1, net6.0, net7.0, net8.0]
+ framework: [net462, net472, net480, net481, net6.0, net7.0, net8.0]
steps:
- uses: actions/checkout@v4
@@ -33,7 +33,6 @@ jobs:
uses: actions/setup-dotnet@v4.0.0
with:
dotnet-version: |
- 3.1.x
6.0.x
7.0.x
8.0.x
diff --git a/.github/workflows/build-and-test-NETCORE.yml b/.github/workflows/build-and-test-NETCORE.yml
index dd094a9bba..e5d0cbdec3 100644
--- a/.github/workflows/build-and-test-NETCORE.yml
+++ b/.github/workflows/build-and-test-NETCORE.yml
@@ -24,7 +24,7 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest]
- framework: [net452, net462, net472, net480, net481, netcoreapp3.1, net6.0, net7.0, net8.0]
+ framework: [net462, net472, net480, net481, net6.0, net7.0, net8.0]
include:
- os: ubuntu-latest
args: "--filter TestCategory!=WindowsOnly"
@@ -36,7 +36,6 @@ jobs:
uses: actions/setup-dotnet@v4.0.0
with:
dotnet-version: |
- 3.1.x
6.0.x
7.0.x
8.0.x
diff --git a/.github/workflows/build-and-test-WEB.yml b/.github/workflows/build-and-test-WEB.yml
index 9f86bfdf54..e225d84a69 100644
--- a/.github/workflows/build-and-test-WEB.yml
+++ b/.github/workflows/build-and-test-WEB.yml
@@ -24,7 +24,7 @@ jobs:
fail-fast: false
matrix:
os: [windows-latest]
- framework: [net452, net462, net472, net480, net481, netcoreapp3.1, net6.0, net7.0, net8.0]
+ framework: [net462, net472, net480, net481, net6.0, net7.0, net8.0]
steps:
- uses: actions/checkout@v4
@@ -33,7 +33,6 @@ jobs:
uses: actions/setup-dotnet@v4.0.0
with:
dotnet-version: |
- 3.1.x
6.0.x
7.0.x
8.0.x
diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml
index ce448c6866..3ffcce4c49 100644
--- a/.github/workflows/nightly.yml
+++ b/.github/workflows/nightly.yml
@@ -30,9 +30,9 @@ jobs:
uses: actions/setup-dotnet@v4.0.0
with:
dotnet-version: |
- 3.1.x
6.0.x
7.0.x
+ 8.0.x
- uses: nuget/setup-nuget@v2
with:
diff --git a/.github/workflows/redfield-sanity-check.yml b/.github/workflows/redfield-sanity-check.yml
index 696bdb0264..b91cfaf3f8 100644
--- a/.github/workflows/redfield-sanity-check.yml
+++ b/.github/workflows/redfield-sanity-check.yml
@@ -24,7 +24,7 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest]
- framework: [netcoreapp3.1,net6.0,net7.0,net8.0]
+ framework: [net6.0,net7.0,net8.0]
include:
- os: ubuntu-latest
args: "--filter TestCategory!=WindowsOnly"
@@ -36,7 +36,6 @@ jobs:
uses: actions/setup-dotnet@v4.0.0
with:
dotnet-version: |
- 3.1.x
6.0.x
7.0.x
8.0.x
diff --git a/.github/workflows/sanity.yml b/.github/workflows/sanity.yml
index 6d2f026c56..f75d0b544a 100644
--- a/.github/workflows/sanity.yml
+++ b/.github/workflows/sanity.yml
@@ -35,7 +35,6 @@ jobs:
uses: actions/setup-dotnet@v4.0.0
with:
dotnet-version: |
- 3.1.x
6.0.x
7.0.x
8.0.x
diff --git a/.props/Test.props b/.props/Test.props
index f80c0e89e3..e2e2305785 100644
--- a/.props/Test.props
+++ b/.props/Test.props
@@ -20,7 +20,7 @@
- net7.0 (GA Nov 2022)
-->
- net8.0;net7.0;net6.0;netcoreapp3.1;
+ net8.0;net7.0;net6.0;
net481;net480;net472;net462;
net46;net452;
diff --git a/.props/_GlobalStaticVersion.props b/.props/_GlobalStaticVersion.props
index cf76e59b8b..5278602302 100644
--- a/.props/_GlobalStaticVersion.props
+++ b/.props/_GlobalStaticVersion.props
@@ -10,10 +10,10 @@
Semantic Version. See http://semver.org for full details.
Update for every public release.
-->
- 2
- 22
+ 3
+ 0
0
-
+ beta1
redfield
nightly
- 2022-07-20
+ 2024-03-15
- $(TargetFrameworks_WithLegacy)
-
true
diff --git a/BASE/Test/Microsoft.ApplicationInsights.Test/Standalone/Microsoft.ApplicationInsights.Isolated.Tests.csproj b/BASE/Test/Microsoft.ApplicationInsights.Test/Standalone/Microsoft.ApplicationInsights.Isolated.Tests.csproj
index a160c05006..ef20347ebb 100644
--- a/BASE/Test/Microsoft.ApplicationInsights.Test/Standalone/Microsoft.ApplicationInsights.Isolated.Tests.csproj
+++ b/BASE/Test/Microsoft.ApplicationInsights.Test/Standalone/Microsoft.ApplicationInsights.Isolated.Tests.csproj
@@ -4,12 +4,12 @@
{2759BC71-7F47-44DA-8579-AE2D8C8C684D}
- net46;netcoreapp3.1
+ net462;net6.0
false
- netcoreapp3.1
+ net6.0
diff --git a/BASE/Test/ServerTelemetryChannel.Test/TelemetryChannel.Tests/TelemetryChannel.Tests.csproj b/BASE/Test/ServerTelemetryChannel.Test/TelemetryChannel.Tests/TelemetryChannel.Tests.csproj
index b50ea2488e..cc6b3f6dbc 100644
--- a/BASE/Test/ServerTelemetryChannel.Test/TelemetryChannel.Tests/TelemetryChannel.Tests.csproj
+++ b/BASE/Test/ServerTelemetryChannel.Test/TelemetryChannel.Tests/TelemetryChannel.Tests.csproj
@@ -3,8 +3,6 @@
- $(TargetFrameworks_WithLegacy)
-
Microsoft.ApplicationInsights.TelemetryChannel.Tests
diff --git a/BASE/src/Microsoft.ApplicationInsights/Extensibility/Implementation/Tracing/BaseDefaultHeartbeatPropertyProvider.cs b/BASE/src/Microsoft.ApplicationInsights/Extensibility/Implementation/Tracing/BaseDefaultHeartbeatPropertyProvider.cs
index 1e82c2da54..173ac6fa7d 100644
--- a/BASE/src/Microsoft.ApplicationInsights/Extensibility/Implementation/Tracing/BaseDefaultHeartbeatPropertyProvider.cs
+++ b/BASE/src/Microsoft.ApplicationInsights/Extensibility/Implementation/Tracing/BaseDefaultHeartbeatPropertyProvider.cs
@@ -109,6 +109,8 @@ private static string GetBaseSdkTargetFramework()
return "net452";
#elif NET46
return "net46";
+#elif NET462
+ return "net462";
#elif NETSTANDARD2_0
return "netstandard2.0";
#else
diff --git a/BASE/src/Microsoft.ApplicationInsights/Extensibility/Implementation/Tracing/SelfDiagnostics/SelfDiagnosticsConfigParser.cs b/BASE/src/Microsoft.ApplicationInsights/Extensibility/Implementation/Tracing/SelfDiagnostics/SelfDiagnosticsConfigParser.cs
index b58299c5ee..c4b73a2c17 100644
--- a/BASE/src/Microsoft.ApplicationInsights/Extensibility/Implementation/Tracing/SelfDiagnostics/SelfDiagnosticsConfigParser.cs
+++ b/BASE/src/Microsoft.ApplicationInsights/Extensibility/Implementation/Tracing/SelfDiagnostics/SelfDiagnosticsConfigParser.cs
@@ -53,7 +53,7 @@ public bool TryGetConfiguration(out string logDirectory, out int fileSizeInKB, o
// Second, check using current working directory.
else if (!File.Exists(configFilePath))
{
-#if NET452
+#if NETFRAMEWORK
configFilePath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, ConfigFileName);
#else
configFilePath = Path.Combine(AppContext.BaseDirectory, ConfigFileName);
diff --git a/BASE/src/Microsoft.ApplicationInsights/Extensibility/SdkInternalOperationsMonitor.cs b/BASE/src/Microsoft.ApplicationInsights/Extensibility/SdkInternalOperationsMonitor.cs
index a6496f256c..456c930257 100644
--- a/BASE/src/Microsoft.ApplicationInsights/Extensibility/SdkInternalOperationsMonitor.cs
+++ b/BASE/src/Microsoft.ApplicationInsights/Extensibility/SdkInternalOperationsMonitor.cs
@@ -1,6 +1,6 @@
namespace Microsoft.ApplicationInsights.Extensibility
{
-#if NET452
+#if NETFRAMEWORK
using System;
using System.Runtime.Remoting.Messaging;
diff --git a/BASE/src/Microsoft.ApplicationInsights/Microsoft.ApplicationInsights.csproj b/BASE/src/Microsoft.ApplicationInsights/Microsoft.ApplicationInsights.csproj
index 2f3fa9ec64..a5ca49c7bc 100644
--- a/BASE/src/Microsoft.ApplicationInsights/Microsoft.ApplicationInsights.csproj
+++ b/BASE/src/Microsoft.ApplicationInsights/Microsoft.ApplicationInsights.csproj
@@ -4,7 +4,7 @@
Microsoft.ApplicationInsights
Microsoft.ApplicationInsights
- net452;net46;netstandard2.0
+ net462;netstandard2.0
netstandard2.0
diff --git a/BASE/src/ServerTelemetryChannel/Implementation/ApplicationFolderProvider.cs b/BASE/src/ServerTelemetryChannel/Implementation/ApplicationFolderProvider.cs
index ac4eeb45b3..f7653daee8 100644
--- a/BASE/src/ServerTelemetryChannel/Implementation/ApplicationFolderProvider.cs
+++ b/BASE/src/ServerTelemetryChannel/Implementation/ApplicationFolderProvider.cs
@@ -119,7 +119,7 @@ public IPlatformFolder GetApplicationFolder()
internal static bool IsWindowsOperatingSystem()
{
-#if NET452
+#if NETFRAMEWORK
return true;
#else
if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
diff --git a/BASE/src/ServerTelemetryChannel/TelemetryChannel.csproj b/BASE/src/ServerTelemetryChannel/TelemetryChannel.csproj
index ddb6f0b0c3..4ed3e2e36b 100644
--- a/BASE/src/ServerTelemetryChannel/TelemetryChannel.csproj
+++ b/BASE/src/ServerTelemetryChannel/TelemetryChannel.csproj
@@ -4,7 +4,7 @@
Microsoft.ApplicationInsights.WindowsServer.TelemetryChannel
Microsoft.AI.ServerTelemetryChannel
- net452;netstandard2.0
+ net462;netstandard2.0
netstandard2.0
@@ -19,7 +19,7 @@
-
+
All
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 0e782641d7..763f82197e 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -2,6 +2,11 @@
## VNext
+## Version 2.23.0
+- [remove target frameworks net452;net46; because they are no longer supported.](https://github.com/microsoft/ApplicationInsights-dotnet/issues/2850)
+affected projects: DependencyCollector, TelemetryChannel, Perf, WindowsServer, Microsoft.ApplicationInsights.
+- Microsoft.ApplicationInsights.AspNetCore targets net6 to enable framework reference to Microsoft.AspNetCore.App.
+
## Version 2.22.0
- no changes since beta.
diff --git a/LOGGING/src/DiagnosticSourceListener/DiagnosticSourceListener.csproj b/LOGGING/src/DiagnosticSourceListener/DiagnosticSourceListener.csproj
index 4e22038644..de03c083b4 100644
--- a/LOGGING/src/DiagnosticSourceListener/DiagnosticSourceListener.csproj
+++ b/LOGGING/src/DiagnosticSourceListener/DiagnosticSourceListener.csproj
@@ -2,7 +2,7 @@
- netstandard2.0;net452
+ netstandard2.0
Microsoft.ApplicationInsights.DiagnosticSourceListener
Microsoft.ApplicationInsights.DiagnosticSourceListener
diff --git a/LOGGING/src/EtwCollector/EtwCollector.csproj b/LOGGING/src/EtwCollector/EtwCollector.csproj
index cf5b4d454b..b92d0f2fcc 100644
--- a/LOGGING/src/EtwCollector/EtwCollector.csproj
+++ b/LOGGING/src/EtwCollector/EtwCollector.csproj
@@ -2,7 +2,7 @@
- net452
+ net462
Microsoft.ApplicationInsights.EtwCollector
Microsoft.ApplicationInsights.EtwCollector
diff --git a/LOGGING/src/Log4NetAppender/Log4NetAppender.csproj b/LOGGING/src/Log4NetAppender/Log4NetAppender.csproj
index 09c31336dd..dcb1334919 100644
--- a/LOGGING/src/Log4NetAppender/Log4NetAppender.csproj
+++ b/LOGGING/src/Log4NetAppender/Log4NetAppender.csproj
@@ -2,7 +2,7 @@
- net452;netstandard2.0
+ netstandard2.0
Microsoft.ApplicationInsights.Log4NetAppender
Microsoft.ApplicationInsights.Log4NetAppender
diff --git a/LOGGING/src/NLogTarget/NLogTarget.csproj b/LOGGING/src/NLogTarget/NLogTarget.csproj
index e6c2e9ddae..c159f99463 100644
--- a/LOGGING/src/NLogTarget/NLogTarget.csproj
+++ b/LOGGING/src/NLogTarget/NLogTarget.csproj
@@ -2,7 +2,7 @@
- net452;netstandard2.0
+ netstandard2.0
Microsoft.ApplicationInsights.NLogTarget
Microsoft.ApplicationInsights.NLogTarget
diff --git a/LOGGING/src/TraceListener/TraceListener.csproj b/LOGGING/src/TraceListener/TraceListener.csproj
index e6e70e646a..0078c8414d 100644
--- a/LOGGING/src/TraceListener/TraceListener.csproj
+++ b/LOGGING/src/TraceListener/TraceListener.csproj
@@ -2,7 +2,7 @@
- net452;netstandard2.0
+ net462;netstandard2.0
Microsoft.ApplicationInsights.TraceListener
Microsoft.ApplicationInsights.TraceListener
diff --git a/LOGGING/test/DiagnosticSourceListener.Tests/DiagnosticSourceListener.Tests.csproj b/LOGGING/test/DiagnosticSourceListener.Tests/DiagnosticSourceListener.Tests.csproj
index 2c78f0521e..7a805fb15b 100644
--- a/LOGGING/test/DiagnosticSourceListener.Tests/DiagnosticSourceListener.Tests.csproj
+++ b/LOGGING/test/DiagnosticSourceListener.Tests/DiagnosticSourceListener.Tests.csproj
@@ -5,7 +5,7 @@
Microsoft.ApplicationInsights.DiagnosticSourceListener.Tests
Microsoft.ApplicationInsights.DiagnosticSourceListener.Tests
- netcoreapp3.1
+ net6.0
diff --git a/LOGGING/test/EtwCollector.Tests/EtwCollector.Tests.csproj b/LOGGING/test/EtwCollector.Tests/EtwCollector.Tests.csproj
index c1afa7942f..6d350b88b0 100644
--- a/LOGGING/test/EtwCollector.Tests/EtwCollector.Tests.csproj
+++ b/LOGGING/test/EtwCollector.Tests/EtwCollector.Tests.csproj
@@ -5,7 +5,7 @@
Microsoft.ApplicationInsights.EtwCollector.Tests
Microsoft.ApplicationInsights.EtwCollector.Tests
- net46
+ net462
diff --git a/LOGGING/test/EventSourceListener.Tests/EventSourceListener.Tests.csproj b/LOGGING/test/EventSourceListener.Tests/EventSourceListener.Tests.csproj
index d3b188001d..d7d272a3cf 100644
--- a/LOGGING/test/EventSourceListener.Tests/EventSourceListener.Tests.csproj
+++ b/LOGGING/test/EventSourceListener.Tests/EventSourceListener.Tests.csproj
@@ -5,7 +5,7 @@
Microsoft.ApplicationInsights.EventSourceListener.Tests
Microsoft.ApplicationInsights.EventSourceListener.Tests
- netcoreapp3.1
+ net6.0
diff --git a/LOGGING/test/Log4NetAppender.Tests/Log4NetAppender.Tests.csproj b/LOGGING/test/Log4NetAppender.Tests/Log4NetAppender.Tests.csproj
index 03214bb5a1..83071d76f0 100644
--- a/LOGGING/test/Log4NetAppender.Tests/Log4NetAppender.Tests.csproj
+++ b/LOGGING/test/Log4NetAppender.Tests/Log4NetAppender.Tests.csproj
@@ -5,7 +5,7 @@
Microsoft.ApplicationInsights.Log4NetAppender.Tests
Microsoft.ApplicationInsights.Log4NetAppender.Tests
- net452;netcoreapp3.1
+ net462;net6.0
@@ -17,7 +17,7 @@
-
+
diff --git a/LOGGING/test/NLogTarget.Tests/NLogTarget.Tests.csproj b/LOGGING/test/NLogTarget.Tests/NLogTarget.Tests.csproj
index 65941f93c8..f487932353 100644
--- a/LOGGING/test/NLogTarget.Tests/NLogTarget.Tests.csproj
+++ b/LOGGING/test/NLogTarget.Tests/NLogTarget.Tests.csproj
@@ -5,7 +5,7 @@
Microsoft.ApplicationInsights.NLogTarget.Tests
Microsoft.ApplicationInsights.NLogTarget.Tests
- net452;netcoreapp3.1
+ net462;net6.0
@@ -17,7 +17,7 @@
-
+
diff --git a/LOGGING/test/TraceListener.Tests/TraceListener.Tests.csproj b/LOGGING/test/TraceListener.Tests/TraceListener.Tests.csproj
index 8a7d124b6b..1aaf12a71c 100644
--- a/LOGGING/test/TraceListener.Tests/TraceListener.Tests.csproj
+++ b/LOGGING/test/TraceListener.Tests/TraceListener.Tests.csproj
@@ -5,7 +5,7 @@
Microsoft.ApplicationInsights.TraceListener.Tests
Microsoft.ApplicationInsights.TraceListener.Tests
- net452;netcoreapp3.1
+ net462;net6.0
@@ -17,7 +17,7 @@
-
+
diff --git a/NETCORE/src/Microsoft.ApplicationInsights.AspNetCore/Microsoft.ApplicationInsights.AspNetCore.csproj b/NETCORE/src/Microsoft.ApplicationInsights.AspNetCore/Microsoft.ApplicationInsights.AspNetCore.csproj
index a62259cd6b..98157b2f39 100644
--- a/NETCORE/src/Microsoft.ApplicationInsights.AspNetCore/Microsoft.ApplicationInsights.AspNetCore.csproj
+++ b/NETCORE/src/Microsoft.ApplicationInsights.AspNetCore/Microsoft.ApplicationInsights.AspNetCore.csproj
@@ -3,7 +3,7 @@
Microsoft.ApplicationInsights.AspNetCore
- netstandard2.0
+ net6.0
netstandard2.0
$(DefineConstants);AI_ASPNETCORE_WEB;
@@ -24,6 +24,10 @@
+
+
+
+
@@ -33,31 +37,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/NETCORE/test/FunctionalTests.MVC.Tests/FunctionalTests.MVC.Tests.csproj b/NETCORE/test/FunctionalTests.MVC.Tests/FunctionalTests.MVC.Tests.csproj
index 5a2e26e08b..9cbb066d40 100644
--- a/NETCORE/test/FunctionalTests.MVC.Tests/FunctionalTests.MVC.Tests.csproj
+++ b/NETCORE/test/FunctionalTests.MVC.Tests/FunctionalTests.MVC.Tests.csproj
@@ -14,6 +14,17 @@
true
true
+
+
+
+
+
+
+
+
+
+
+
@@ -26,9 +37,9 @@
PreserveNewest
-
+
PreserveNewest
-
+
@@ -37,17 +48,6 @@
-
-
-
-
-
-
-
-
-
-
-
@@ -55,9 +55,14 @@
runtime; build; native; contentfiles; analyzers; buildtransitive
+
+
+
+
+
diff --git a/NETCORE/test/FunctionalTests.MVC.Tests/Startup.cs b/NETCORE/test/FunctionalTests.MVC.Tests/Startup.cs
index 5d7db3ca1c..1ab869c668 100644
--- a/NETCORE/test/FunctionalTests.MVC.Tests/Startup.cs
+++ b/NETCORE/test/FunctionalTests.MVC.Tests/Startup.cs
@@ -35,7 +35,10 @@ public void ConfigureServices(IServiceCollection services)
services.AddSingleton(typeof(ITelemetryChannel), new InMemoryChannel());
services.AddApplicationInsightsTelemetry(applicationInsightsOptions);
- services.AddMvc();
+
+ services.AddMvcCore();
+ services.AddControllersWithViews()
+ .AddRazorRuntimeCompilation();
}
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
@@ -53,11 +56,13 @@ public void Configure(IApplicationBuilder app, IHostingEnvironment env)
app.UseStaticFiles();
- app.UseMvc(routes =>
+ app.UseRouting();
+
+ app.UseEndpoints(endpoints =>
{
- routes.MapRoute(
+ endpoints.MapControllerRoute(
name: "default",
- template: "{controller=Home}/{action=Index}/{id?}");
+ pattern: "{controller=Home}/{action=Index}/{id?}");
});
}
}
diff --git a/NETCORE/test/FunctionalTests.Utils/TelemetryTestsBase.cs b/NETCORE/test/FunctionalTests.Utils/TelemetryTestsBase.cs
index 9bae62bdb9..c0b9f7c8d1 100644
--- a/NETCORE/test/FunctionalTests.Utils/TelemetryTestsBase.cs
+++ b/NETCORE/test/FunctionalTests.Utils/TelemetryTestsBase.cs
@@ -131,6 +131,8 @@ protected HttpResponseMessage ExecuteRequest(string requestPath, Dictionary { }); // ignore all errors
+ await hc.GetAsync("https://visualstudio.microsoft.com/msdn-platforms/").ContinueWith(t => { }); // ignore all errors
}
}
}
diff --git a/NETCORE/test/FunctionalTests.WebApi.Tests/FunctionalTest/RequestCorrelationTests.cs b/NETCORE/test/FunctionalTests.WebApi.Tests/FunctionalTest/RequestCorrelationTests.cs
index 35b1737bef..94dc865854 100644
--- a/NETCORE/test/FunctionalTests.WebApi.Tests/FunctionalTest/RequestCorrelationTests.cs
+++ b/NETCORE/test/FunctionalTests.WebApi.Tests/FunctionalTest/RequestCorrelationTests.cs
@@ -217,7 +217,7 @@ public void TestRequestWithRequestIdAndTraceParentHeader()
}
[Fact]
- public void TestRequestWithRequestIdAndTraceParentHeaderWithW3CDisabled()
+ public void TestRequestWithRequestIdHeaderWithW3CDisabled()
{
try
{
@@ -239,8 +239,10 @@ public void TestRequestWithRequestIdAndTraceParentHeaderWithW3CDisabled()
{
// Both request id and traceparent
["Request-Id"] = "|8ee8641cbdd8dd280d239fa2121c7e4e.df07da90a5b27d93.",
- ["traceparent"] = "00-4bf92f3577b34da6a3ce929d0e0e4736-00f067aa0ba902b7-01",
- ["tracestate"] = "some=state",
+ // If traceparent is sent in the request, it seems that is has more priority then Request-Id
+ // so, do not send traceparent and tracestate if you want to use Request-Id and test Hierchical Tracing
+ //["traceparent"] = "00-4bf92f3577b34da6a3ce929d0e0e4736-00f067aa0ba902b7-01",
+ //["tracestate"] = "some=state",
["Correlation-Context"] = "k1=v1,k2=v2"
};
diff --git a/NETCORE/test/FunctionalTests.WebApi.Tests/FunctionalTests.WebApi.Tests.csproj b/NETCORE/test/FunctionalTests.WebApi.Tests/FunctionalTests.WebApi.Tests.csproj
index 76b1866330..a568a8f48e 100644
--- a/NETCORE/test/FunctionalTests.WebApi.Tests/FunctionalTests.WebApi.Tests.csproj
+++ b/NETCORE/test/FunctionalTests.WebApi.Tests/FunctionalTests.WebApi.Tests.csproj
@@ -25,11 +25,6 @@
-
-
-
-
-
all
@@ -39,6 +34,10 @@
+
+
+
+
diff --git a/NETCORE/test/FunctionalTests.WebApi.Tests/Startup.cs b/NETCORE/test/FunctionalTests.WebApi.Tests/Startup.cs
index 78eee6b87a..39b426947e 100644
--- a/NETCORE/test/FunctionalTests.WebApi.Tests/Startup.cs
+++ b/NETCORE/test/FunctionalTests.WebApi.Tests/Startup.cs
@@ -23,7 +23,7 @@ public void ConfigureServices(IServiceCollection services)
services.AddSingleton(endpointAddress);
services.AddSingleton(typeof(ITelemetryChannel), new InMemoryChannel() { EndpointAddress = endpointAddress.ConnectionString, DeveloperMode = true });
services.AddApplicationInsightsTelemetry(InProcessServer.IKey);
- services.AddMvc();
+ services.AddControllers();
}
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
@@ -34,10 +34,11 @@ public void Configure(IApplicationBuilder app, IHostingEnvironment env)
app.UseDeveloperExceptionPage();
}
- app.UseMvc(routes =>
+ app.UseRouting();
+
+ app.UseEndpoints(endpoints =>
{
- // Add the following route for porting Web API 2 controllers.
- routes.MapWebApiRoute("DefaultApi", "api/{controller}/{id?}");
+ endpoints.MapControllers();
});
}
}
diff --git a/NETCORE/test/Microsoft.ApplicationInsights.AspNetCore.Tests/Microsoft.ApplicationInsights.AspNetCore.Tests.csproj b/NETCORE/test/Microsoft.ApplicationInsights.AspNetCore.Tests/Microsoft.ApplicationInsights.AspNetCore.Tests.csproj
index 39bb5f9b7e..e960449d28 100644
--- a/NETCORE/test/Microsoft.ApplicationInsights.AspNetCore.Tests/Microsoft.ApplicationInsights.AspNetCore.Tests.csproj
+++ b/NETCORE/test/Microsoft.ApplicationInsights.AspNetCore.Tests/Microsoft.ApplicationInsights.AspNetCore.Tests.csproj
@@ -21,12 +21,7 @@
-
-
-
-
+
diff --git a/WEB/Src/DependencyCollector/DependencyCollector.Tests/DependencyCollector.Tests.csproj b/WEB/Src/DependencyCollector/DependencyCollector.Tests/DependencyCollector.Tests.csproj
index e25d8c3efe..b0c7f8e3ed 100644
--- a/WEB/Src/DependencyCollector/DependencyCollector.Tests/DependencyCollector.Tests.csproj
+++ b/WEB/Src/DependencyCollector/DependencyCollector.Tests/DependencyCollector.Tests.csproj
@@ -3,8 +3,6 @@
- $(TargetFrameworks_WithLegacy)
-
Microsoft.ApplicationInsights.DependencyCollector.Tests
Microsoft.AI.DependencyCollector.Tests
diff --git a/WEB/Src/DependencyCollector/DependencyCollector/DependencyCollector.csproj b/WEB/Src/DependencyCollector/DependencyCollector/DependencyCollector.csproj
index 11fd6ca6d6..b6653beecb 100644
--- a/WEB/Src/DependencyCollector/DependencyCollector/DependencyCollector.csproj
+++ b/WEB/Src/DependencyCollector/DependencyCollector/DependencyCollector.csproj
@@ -4,7 +4,7 @@
Microsoft.ApplicationInsights.DependencyCollector
Microsoft.AI.DependencyCollector
- net452;netstandard2.0
+ net462;netstandard2.0
netstandard2.0
false
@@ -29,13 +29,13 @@
-
+
-
+
diff --git a/WEB/Src/DependencyCollector/DependencyCollector/DependencyTrackingTelemetryModule.cs b/WEB/Src/DependencyCollector/DependencyCollector/DependencyTrackingTelemetryModule.cs
index 12ce39323b..a4f62f602e 100644
--- a/WEB/Src/DependencyCollector/DependencyCollector/DependencyTrackingTelemetryModule.cs
+++ b/WEB/Src/DependencyCollector/DependencyCollector/DependencyTrackingTelemetryModule.cs
@@ -24,7 +24,7 @@ public class DependencyTrackingTelemetryModule : ITelemetryModule, IDisposable
{
private readonly object lockObject = new object();
-#if NET452
+#if NETFRAMEWORK
private HttpDesktopDiagnosticSourceListener httpDesktopDiagnosticSourceListener;
private FrameworkHttpEventListener httpEventListener;
private FrameworkSqlEventListener sqlEventListener;
@@ -231,7 +231,7 @@ protected virtual void Dispose(bool disposing)
{
if (disposing)
{
-#if NET452
+#if NETFRAMEWORK
// Net40 does not support framework event source and diagnostic source
if (this.httpDesktopDiagnosticSourceListener != null)
{
diff --git a/WEB/Src/DependencyCollector/DependencyCollector/Implementation/AzureSdk/AzureSdkEventListener.cs b/WEB/Src/DependencyCollector/DependencyCollector/Implementation/AzureSdk/AzureSdkEventListener.cs
index a5495a4b2d..392fbba47b 100644
--- a/WEB/Src/DependencyCollector/DependencyCollector/Implementation/AzureSdk/AzureSdkEventListener.cs
+++ b/WEB/Src/DependencyCollector/DependencyCollector/Implementation/AzureSdk/AzureSdkEventListener.cs
@@ -87,7 +87,7 @@ protected sealed override void OnEventWritten(EventWrittenEventArgs eventData)
trace.Properties["EventId"] = eventData.EventId.ToString(CultureInfo.InvariantCulture);
}
-#if !NET452
+#if !NETFRAMEWORK
if (!string.IsNullOrEmpty(eventData.EventName))
{
trace.Properties["EventName"] = eventData.EventName;
diff --git a/WEB/Src/DependencyCollector/DependencyCollector/Implementation/ClientServerDependencyTracker.cs b/WEB/Src/DependencyCollector/DependencyCollector/Implementation/ClientServerDependencyTracker.cs
index f0e50e7b9e..2104c99cf0 100644
--- a/WEB/Src/DependencyCollector/DependencyCollector/Implementation/ClientServerDependencyTracker.cs
+++ b/WEB/Src/DependencyCollector/DependencyCollector/Implementation/ClientServerDependencyTracker.cs
@@ -1,4 +1,4 @@
-#if NET452
+#if NETFRAMEWORK
namespace Microsoft.ApplicationInsights.DependencyCollector.Implementation
{
using System;
diff --git a/WEB/Src/DependencyCollector/DependencyCollector/Implementation/DependencyTableStore.cs b/WEB/Src/DependencyCollector/DependencyCollector/Implementation/DependencyTableStore.cs
index 3d60d06d7f..93d371e6a6 100644
--- a/WEB/Src/DependencyCollector/DependencyCollector/Implementation/DependencyTableStore.cs
+++ b/WEB/Src/DependencyCollector/DependencyCollector/Implementation/DependencyTableStore.cs
@@ -1,4 +1,4 @@
-#if NET452
+#if NETFRAMEWORK
namespace Microsoft.ApplicationInsights.DependencyCollector.Implementation
{
using System;
diff --git a/WEB/Src/DependencyCollector/DependencyCollector/Implementation/DesktopDiagnosticSourceHttpProcessing.cs b/WEB/Src/DependencyCollector/DependencyCollector/Implementation/DesktopDiagnosticSourceHttpProcessing.cs
index 4fe70b43d5..346e369af8 100644
--- a/WEB/Src/DependencyCollector/DependencyCollector/Implementation/DesktopDiagnosticSourceHttpProcessing.cs
+++ b/WEB/Src/DependencyCollector/DependencyCollector/Implementation/DesktopDiagnosticSourceHttpProcessing.cs
@@ -1,4 +1,4 @@
-#if NET452
+#if NETFRAMEWORK
namespace Microsoft.ApplicationInsights.DependencyCollector.Implementation
{
using System;
diff --git a/WEB/Src/DependencyCollector/DependencyCollector/Implementation/FrameworkHttpEventListener.cs b/WEB/Src/DependencyCollector/DependencyCollector/Implementation/FrameworkHttpEventListener.cs
index 9812ad786b..6ee91dd5eb 100644
--- a/WEB/Src/DependencyCollector/DependencyCollector/Implementation/FrameworkHttpEventListener.cs
+++ b/WEB/Src/DependencyCollector/DependencyCollector/Implementation/FrameworkHttpEventListener.cs
@@ -1,4 +1,4 @@
-#if NET452
+#if NETFRAMEWORK
namespace Microsoft.ApplicationInsights.DependencyCollector.Implementation
{
using System;
diff --git a/WEB/Src/DependencyCollector/DependencyCollector/Implementation/FrameworkHttpProcessing.cs b/WEB/Src/DependencyCollector/DependencyCollector/Implementation/FrameworkHttpProcessing.cs
index 61a945a413..8288060c6e 100644
--- a/WEB/Src/DependencyCollector/DependencyCollector/Implementation/FrameworkHttpProcessing.cs
+++ b/WEB/Src/DependencyCollector/DependencyCollector/Implementation/FrameworkHttpProcessing.cs
@@ -1,4 +1,4 @@
-#if NET452
+#if NETFRAMEWORK
namespace Microsoft.ApplicationInsights.DependencyCollector.Implementation
{
using System;
diff --git a/WEB/Src/DependencyCollector/DependencyCollector/Implementation/FrameworkSqlEventListener.cs b/WEB/Src/DependencyCollector/DependencyCollector/Implementation/FrameworkSqlEventListener.cs
index 6d6b077eed..7bc010e428 100644
--- a/WEB/Src/DependencyCollector/DependencyCollector/Implementation/FrameworkSqlEventListener.cs
+++ b/WEB/Src/DependencyCollector/DependencyCollector/Implementation/FrameworkSqlEventListener.cs
@@ -1,4 +1,4 @@
-#if NET452
+#if NETFRAMEWORK
namespace Microsoft.ApplicationInsights.DependencyCollector.Implementation
{
using System;
diff --git a/WEB/Src/DependencyCollector/DependencyCollector/Implementation/FrameworkSqlProcessing.cs b/WEB/Src/DependencyCollector/DependencyCollector/Implementation/FrameworkSqlProcessing.cs
index fc3cdbcd5d..575f296a00 100644
--- a/WEB/Src/DependencyCollector/DependencyCollector/Implementation/FrameworkSqlProcessing.cs
+++ b/WEB/Src/DependencyCollector/DependencyCollector/Implementation/FrameworkSqlProcessing.cs
@@ -1,4 +1,4 @@
-#if NET452
+#if NETFRAMEWORK
namespace Microsoft.ApplicationInsights.DependencyCollector.Implementation
{
using System;
diff --git a/WEB/Src/DependencyCollector/DependencyCollector/Implementation/HttpDesktopDiagnosticSourceListener.cs b/WEB/Src/DependencyCollector/DependencyCollector/Implementation/HttpDesktopDiagnosticSourceListener.cs
index 8313fb88bb..42114a5d02 100644
--- a/WEB/Src/DependencyCollector/DependencyCollector/Implementation/HttpDesktopDiagnosticSourceListener.cs
+++ b/WEB/Src/DependencyCollector/DependencyCollector/Implementation/HttpDesktopDiagnosticSourceListener.cs
@@ -1,4 +1,4 @@
-#if NET452
+#if NETFRAMEWORK
namespace Microsoft.ApplicationInsights.DependencyCollector.Implementation
{
using System;
diff --git a/WEB/Src/DependencyCollector/DependencyCollector/Implementation/HttpDesktopDiagnosticSourceSubscriber.cs b/WEB/Src/DependencyCollector/DependencyCollector/Implementation/HttpDesktopDiagnosticSourceSubscriber.cs
index 54cb2f2e67..707a1c319c 100644
--- a/WEB/Src/DependencyCollector/DependencyCollector/Implementation/HttpDesktopDiagnosticSourceSubscriber.cs
+++ b/WEB/Src/DependencyCollector/DependencyCollector/Implementation/HttpDesktopDiagnosticSourceSubscriber.cs
@@ -1,4 +1,4 @@
-#if NET452
+#if NETFRAMEWORK
namespace Microsoft.ApplicationInsights.DependencyCollector.Implementation
{
using System;
diff --git a/WEB/Src/DependencyCollector/DependencyCollector/Implementation/HttpProcessing.cs b/WEB/Src/DependencyCollector/DependencyCollector/Implementation/HttpProcessing.cs
index abccd0d7ab..f69398100c 100644
--- a/WEB/Src/DependencyCollector/DependencyCollector/Implementation/HttpProcessing.cs
+++ b/WEB/Src/DependencyCollector/DependencyCollector/Implementation/HttpProcessing.cs
@@ -1,4 +1,4 @@
-#if NET452
+#if NETFRAMEWORK
namespace Microsoft.ApplicationInsights.DependencyCollector.Implementation
{
using System;
diff --git a/WEB/Src/DependencyCollector/DependencyCollector/Implementation/Operation/CacheBasedOperationHolder.cs b/WEB/Src/DependencyCollector/DependencyCollector/Implementation/Operation/CacheBasedOperationHolder.cs
index a2012405b6..02c3990b5c 100644
--- a/WEB/Src/DependencyCollector/DependencyCollector/Implementation/Operation/CacheBasedOperationHolder.cs
+++ b/WEB/Src/DependencyCollector/DependencyCollector/Implementation/Operation/CacheBasedOperationHolder.cs
@@ -1,4 +1,4 @@
-#if NET452
+#if NETFRAMEWORK
namespace Microsoft.ApplicationInsights.DependencyCollector.Implementation.Operation
{
using System;
diff --git a/WEB/Src/DependencyCollector/DependencyCollector/Implementation/ProfilerHttpProcessing.cs b/WEB/Src/DependencyCollector/DependencyCollector/Implementation/ProfilerHttpProcessing.cs
index ef474bc6eb..77b930ab3c 100644
--- a/WEB/Src/DependencyCollector/DependencyCollector/Implementation/ProfilerHttpProcessing.cs
+++ b/WEB/Src/DependencyCollector/DependencyCollector/Implementation/ProfilerHttpProcessing.cs
@@ -1,4 +1,4 @@
-#if NET452
+#if NETFRAMEWORK
namespace Microsoft.ApplicationInsights.DependencyCollector.Implementation
{
using System;
diff --git a/WEB/Src/DependencyCollector/DependencyCollector/Implementation/ProfilerRuntimeInstrumentation.cs b/WEB/Src/DependencyCollector/DependencyCollector/Implementation/ProfilerRuntimeInstrumentation.cs
index 4c428eb351..0937535762 100644
--- a/WEB/Src/DependencyCollector/DependencyCollector/Implementation/ProfilerRuntimeInstrumentation.cs
+++ b/WEB/Src/DependencyCollector/DependencyCollector/Implementation/ProfilerRuntimeInstrumentation.cs
@@ -1,4 +1,4 @@
-#if NET452
+#if NETFRAMEWORK
namespace Microsoft.ApplicationInsights.DependencyCollector.Implementation
{
using Microsoft.Diagnostics.Instrumentation.Extensions.Intercept;
diff --git a/WEB/Src/DependencyCollector/DependencyCollector/Implementation/ProfilerSqlCommandProcessing.cs b/WEB/Src/DependencyCollector/DependencyCollector/Implementation/ProfilerSqlCommandProcessing.cs
index 9152f35d4a..95cce3577b 100644
--- a/WEB/Src/DependencyCollector/DependencyCollector/Implementation/ProfilerSqlCommandProcessing.cs
+++ b/WEB/Src/DependencyCollector/DependencyCollector/Implementation/ProfilerSqlCommandProcessing.cs
@@ -1,4 +1,4 @@
-#if NET452
+#if NETFRAMEWORK
namespace Microsoft.ApplicationInsights.DependencyCollector.Implementation
{
using System.Data;
diff --git a/WEB/Src/DependencyCollector/DependencyCollector/Implementation/ProfilerSqlConnectionProcessing.cs b/WEB/Src/DependencyCollector/DependencyCollector/Implementation/ProfilerSqlConnectionProcessing.cs
index 294c62ecb7..9bd0bbcd3d 100644
--- a/WEB/Src/DependencyCollector/DependencyCollector/Implementation/ProfilerSqlConnectionProcessing.cs
+++ b/WEB/Src/DependencyCollector/DependencyCollector/Implementation/ProfilerSqlConnectionProcessing.cs
@@ -1,4 +1,4 @@
-#if NET452
+#if NETFRAMEWORK
namespace Microsoft.ApplicationInsights.DependencyCollector.Implementation
{
using System.Data.SqlClient;
diff --git a/WEB/Src/DependencyCollector/DependencyCollector/Implementation/ProfilerSqlProcessingBase.cs b/WEB/Src/DependencyCollector/DependencyCollector/Implementation/ProfilerSqlProcessingBase.cs
index c4c9c4c203..4ccb1f51f3 100644
--- a/WEB/Src/DependencyCollector/DependencyCollector/Implementation/ProfilerSqlProcessingBase.cs
+++ b/WEB/Src/DependencyCollector/DependencyCollector/Implementation/ProfilerSqlProcessingBase.cs
@@ -1,4 +1,4 @@
-#if NET452
+#if NETFRAMEWORK
namespace Microsoft.ApplicationInsights.DependencyCollector.Implementation
{
using System;
diff --git a/WEB/Src/DependencyCollector/DependencyCollector/Implementation/RetryPolicy.cs b/WEB/Src/DependencyCollector/DependencyCollector/Implementation/RetryPolicy.cs
index 43a4f95594..b93cd2957e 100644
--- a/WEB/Src/DependencyCollector/DependencyCollector/Implementation/RetryPolicy.cs
+++ b/WEB/Src/DependencyCollector/DependencyCollector/Implementation/RetryPolicy.cs
@@ -1,4 +1,4 @@
-#if NET452
+#if NETFRAMEWORK
namespace Microsoft.ApplicationInsights.DependencyCollector.Implementation
{
using System;
diff --git a/WEB/Src/DependencyCollector/DependencyCollector/TelemetryExtensionsForDependencyCollector.cs b/WEB/Src/DependencyCollector/DependencyCollector/TelemetryExtensionsForDependencyCollector.cs
index f007ca49ae..f49a413344 100644
--- a/WEB/Src/DependencyCollector/DependencyCollector/TelemetryExtensionsForDependencyCollector.cs
+++ b/WEB/Src/DependencyCollector/DependencyCollector/TelemetryExtensionsForDependencyCollector.cs
@@ -1,4 +1,4 @@
-#if NET452
+#if NETFRAMEWORK
namespace Microsoft.ApplicationInsights.DependencyCollector
{
using System;
diff --git a/WEB/Src/PerformanceCollector/Perf.Tests/Perf.Tests.csproj b/WEB/Src/PerformanceCollector/Perf.Tests/Perf.Tests.csproj
index d7d07e32c6..12186720fe 100644
--- a/WEB/Src/PerformanceCollector/Perf.Tests/Perf.Tests.csproj
+++ b/WEB/Src/PerformanceCollector/Perf.Tests/Perf.Tests.csproj
@@ -3,8 +3,6 @@
- $(TargetFrameworks_WithLegacy)
-
Microsoft.AI.PerformanceCollector.Tests
Microsoft.ApplicationInsights.Tests
diff --git a/WEB/Src/PerformanceCollector/PerformanceCollector/Implementation/PerformanceCounterUtility.cs b/WEB/Src/PerformanceCollector/PerformanceCollector/Implementation/PerformanceCounterUtility.cs
index fd4925ad8b..63604bd594 100644
--- a/WEB/Src/PerformanceCollector/PerformanceCollector/Implementation/PerformanceCounterUtility.cs
+++ b/WEB/Src/PerformanceCollector/PerformanceCollector/Implementation/PerformanceCounterUtility.cs
@@ -19,7 +19,7 @@
///
/// Utility functionality for performance counter collection.
///
- [SuppressMessage("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields", Justification = "This class has different code for Net452/NetCore")]
+ [SuppressMessage("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields", Justification = "This class has different code for Net462/NetCore")]
internal static class PerformanceCounterUtility
{
#if NETSTANDARD2_0
@@ -74,7 +74,7 @@ public static bool IsPerfCounterSupported()
return true;
}
-#if NET452
+#if NETFRAMEWORK
public static IPerformanceCollector GetPerformanceCollector()
{
IPerformanceCollector collector;
@@ -353,7 +353,7 @@ internal static string GetInstanceFromApplicationDomain(string domainFriendlyNam
return nameWithoutTrailingData.Replace('/', '_');
}
- [SuppressMessage("Microsoft.Usage", "CA1801:ReviewUnusedParameters", Justification = "This method has different code for Net452/NetCore")]
+ [SuppressMessage("Microsoft.Usage", "CA1801:ReviewUnusedParameters", Justification = "This method has different code for Net462/NetCore")]
internal static string GetInstanceForWin32Process(IEnumerable win32Instances)
{
return FindProcessInstance(
@@ -363,7 +363,7 @@ internal static string GetInstanceForWin32Process(IEnumerable win32Insta
Win32ProcessCounterName);
}
- [SuppressMessage("Microsoft.Usage", "CA1801:ReviewUnusedParameters", Justification = "This method has different code for Net452/NetCore")]
+ [SuppressMessage("Microsoft.Usage", "CA1801:ReviewUnusedParameters", Justification = "This method has different code for Net462/NetCore")]
internal static string GetInstanceForClrProcess(IEnumerable clrInstances)
{
return FindProcessInstance(
diff --git a/WEB/Src/PerformanceCollector/PerformanceCollector/Implementation/WebAppPerformanceCollector/CacheHelper.cs b/WEB/Src/PerformanceCollector/PerformanceCollector/Implementation/WebAppPerformanceCollector/CacheHelper.cs
index e80fd5d498..98fcb658fa 100644
--- a/WEB/Src/PerformanceCollector/PerformanceCollector/Implementation/WebAppPerformanceCollector/CacheHelper.cs
+++ b/WEB/Src/PerformanceCollector/PerformanceCollector/Implementation/WebAppPerformanceCollector/CacheHelper.cs
@@ -13,7 +13,7 @@
///
/// Class to contain the one cache for all Gauges.
///
- [SuppressMessage("Microsoft.Performance", "CA1822:MarkMembersAsStatic", Justification="This class targets both net452 and netstandard. Net Standard implementation has instance members.")]
+ [SuppressMessage("Microsoft.Performance", "CA1822:MarkMembersAsStatic", Justification="This class targets both net462 and netstandard. Net Standard implementation has instance members.")]
internal class CacheHelper : ICachedEnvironmentVariableAccess, IDisposable
{
///
diff --git a/WEB/Src/PerformanceCollector/PerformanceCollector/Perf.csproj b/WEB/Src/PerformanceCollector/PerformanceCollector/Perf.csproj
index 5526b41b0c..d54e2a5e5c 100644
--- a/WEB/Src/PerformanceCollector/PerformanceCollector/Perf.csproj
+++ b/WEB/Src/PerformanceCollector/PerformanceCollector/Perf.csproj
@@ -4,7 +4,7 @@
Microsoft.ApplicationInsights.Extensibility.PerfCounterCollector
Microsoft.AI.PerfCounterCollector
- net452;netstandard2.0
+ net462;netstandard2.0
netstandard2.0
@@ -21,7 +21,7 @@
-
+
@@ -45,7 +45,7 @@
-
+
\ No newline at end of file
diff --git a/WEB/Src/PerformanceCollector/PerformanceCollector/PerformanceCollectorModule.cs b/WEB/Src/PerformanceCollector/PerformanceCollector/PerformanceCollectorModule.cs
index 0b5a542393..b34f066e08 100644
--- a/WEB/Src/PerformanceCollector/PerformanceCollector/PerformanceCollectorModule.cs
+++ b/WEB/Src/PerformanceCollector/PerformanceCollector/PerformanceCollectorModule.cs
@@ -160,7 +160,7 @@ public void Initialize(TelemetryConfiguration configuration)
this.DefaultCounters.Add(new PerformanceCounterCollectionRequest(@"\Process(??APP_WIN32_PROC??)\% Processor Time Normalized", @"\Process(??APP_WIN32_PROC??)\% Processor Time Normalized"));
this.DefaultCounters.Add(new PerformanceCounterCollectionRequest(@"\Process(??APP_WIN32_PROC??)\Private Bytes", @"\Process(??APP_WIN32_PROC??)\Private Bytes"));
-#if NET452 // The following are Asp.Net specific counters.
+#if NETFRAMEWORK // The following are Asp.Net specific counters.
this.DefaultCounters.Add(new PerformanceCounterCollectionRequest(@"\ASP.NET Applications(??APP_W3SVC_PROC??)\Requests/Sec", @"\ASP.NET Applications(??APP_W3SVC_PROC??)\Requests/Sec"));
this.DefaultCounters.Add(new PerformanceCounterCollectionRequest(@"\.NET CLR Exceptions(??APP_CLR_PROC??)\# of Exceps Thrown / sec", @"\.NET CLR Exceptions(??APP_CLR_PROC??)\# of Exceps Thrown / sec"));
this.DefaultCounters.Add(new PerformanceCounterCollectionRequest(@"\ASP.NET Applications(??APP_W3SVC_PROC??)\Request Execution Time", @"\ASP.NET Applications(??APP_W3SVC_PROC??)\Request Execution Time"));
diff --git a/WEB/Src/PerformanceCollector/PerformanceCollector/QuickPulseTelemetryProcessor.cs b/WEB/Src/PerformanceCollector/PerformanceCollector/QuickPulseTelemetryProcessor.cs
index fe18c96a94..a2c15ff678 100644
--- a/WEB/Src/PerformanceCollector/PerformanceCollector/QuickPulseTelemetryProcessor.cs
+++ b/WEB/Src/PerformanceCollector/PerformanceCollector/QuickPulseTelemetryProcessor.cs
@@ -626,7 +626,7 @@ private void ProcessTelemetry(ITelemetry telemetry)
private ITelemetryDocument ConvertRequestToTelemetryDocument(RequestTelemetry requestTelemetry)
{
var url = requestTelemetry.Url;
-#if NET452
+#if NETFRAMEWORK
if (this.EvaluateDisabledTrackingProperties && url == null)
{
try
diff --git a/WEB/Src/Web/Web.Tests/Web.Tests.csproj b/WEB/Src/Web/Web.Tests/Web.Tests.csproj
index c43c44fd29..715f92ddee 100644
--- a/WEB/Src/Web/Web.Tests/Web.Tests.csproj
+++ b/WEB/Src/Web/Web.Tests/Web.Tests.csproj
@@ -4,7 +4,7 @@
- $(TargetFrameworks_NetFrameworkOnly)
+ $(SupportedFrameworks_NetFx)
Microsoft.ApplicationInsights.Web.Tests
diff --git a/WEB/Src/Web/Web/Implementation/WebEventSource.cs b/WEB/Src/Web/Web/Implementation/WebEventSource.cs
index 5402b0a778..1fd8daaaa8 100644
--- a/WEB/Src/Web/Web/Implementation/WebEventSource.cs
+++ b/WEB/Src/Web/Web/Implementation/WebEventSource.cs
@@ -2,7 +2,7 @@
{
using System;
using System.Diagnostics.CodeAnalysis;
-#if NET452
+#if NETFRAMEWORK
using System.Diagnostics.Tracing;
#endif
using Microsoft.ApplicationInsights.Common;
diff --git a/WEB/Src/Web/Web/Web.csproj b/WEB/Src/Web/Web/Web.csproj
index 236b1938f7..1d951247bd 100644
--- a/WEB/Src/Web/Web/Web.csproj
+++ b/WEB/Src/Web/Web/Web.csproj
@@ -4,7 +4,7 @@
Microsoft.ApplicationInsights.Web
Microsoft.AI.Web
- net452
+ net462
false
$(DefineConstants);ALLOW_AGGRESSIVE_INLIGNING_ATTRIBUTE
diff --git a/WEB/Src/WindowsServer/WindowsServer.Tests/Mock/NetPlatformHttpResponseTypesExtension.cs b/WEB/Src/WindowsServer/WindowsServer.Tests/Mock/NetPlatformHttpResponseTypesExtension.cs
index 8ce0047410..2149af3edd 100644
--- a/WEB/Src/WindowsServer/WindowsServer.Tests/Mock/NetPlatformHttpResponseTypesExtension.cs
+++ b/WEB/Src/WindowsServer/WindowsServer.Tests/Mock/NetPlatformHttpResponseTypesExtension.cs
@@ -28,7 +28,7 @@ public static void SetContentEncoding(this HttpResponse resp, Encoding enc)
{
}
-#elif NET452
+#elif NETFRAMEWORK
public static void SetContentLength(this HttpListenerResponse resp, long len)
{
diff --git a/WEB/Src/WindowsServer/WindowsServer.Tests/WindowsServer.Tests.csproj b/WEB/Src/WindowsServer/WindowsServer.Tests/WindowsServer.Tests.csproj
index 3166c8ff9b..ee546911a4 100644
--- a/WEB/Src/WindowsServer/WindowsServer.Tests/WindowsServer.Tests.csproj
+++ b/WEB/Src/WindowsServer/WindowsServer.Tests/WindowsServer.Tests.csproj
@@ -3,8 +3,6 @@
- $(TargetFrameworks_WithLegacy)
-
Microsoft.AI.WindowsServer.Tests
Microsoft.ApplicationInsights.Tests
diff --git a/WEB/Src/WindowsServer/WindowsServer/WindowsServer.csproj b/WEB/Src/WindowsServer/WindowsServer/WindowsServer.csproj
index aab6dd0694..34353da7cd 100644
--- a/WEB/Src/WindowsServer/WindowsServer/WindowsServer.csproj
+++ b/WEB/Src/WindowsServer/WindowsServer/WindowsServer.csproj
@@ -4,7 +4,7 @@
Microsoft.ApplicationInsights.WindowsServer
Microsoft.AI.WindowsServer
- net452;netstandard2.0
+ net462;netstandard2.0
netstandard2.0
@@ -35,7 +35,7 @@
-
+