Skip to content

Remove target frameworks net452;net46; because they are no longer sup… #2854

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions .github/workflows/build-and-test-BASE.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/build-and-test-LOGGING.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/build-and-test-NETCORE.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/build-and-test-WEB.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/redfield-sanity-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/sanity.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .props/Test.props
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
- net7.0 (GA Nov 2022)
-->

<SupportedFrameworks_NetCore>net8.0;net7.0;net6.0;netcoreapp3.1;</SupportedFrameworks_NetCore>
<SupportedFrameworks_NetCore>net8.0;net7.0;net6.0;</SupportedFrameworks_NetCore>
<SupportedFrameworks_NetFx Condition="$(OS) == 'Windows_NT'">net481;net480;net472;net462;</SupportedFrameworks_NetFx>
<LegacyFrameworks_NetFx Condition="$(OS) == 'Windows_NT'">net46;net452;</LegacyFrameworks_NetFx>

Expand Down
8 changes: 4 additions & 4 deletions .props/_GlobalStaticVersion.props
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@
Semantic Version. See http://semver.org for full details.
Update for every public release.
-->
<SemanticVersionMajor>2</SemanticVersionMajor>
<SemanticVersionMinor>22</SemanticVersionMinor> <!-- If changing the Minor version, also update the Date value. -->
<SemanticVersionMajor>3</SemanticVersionMajor>
<SemanticVersionMinor>0</SemanticVersionMinor> <!-- If changing the Minor version, also update the Date value. -->
<SemanticVersionPatch>0</SemanticVersionPatch>
<PreReleaseMilestone></PreReleaseMilestone> <!--Valid values: beta1, beta2, EMPTY for stable -->
<PreReleaseMilestone>beta1</PreReleaseMilestone> <!--Valid values: beta1, beta2, EMPTY for stable -->
<PreReleaseMilestone Condition="'$(Redfield)' == 'True'">redfield</PreReleaseMilestone>
<PreReleaseMilestone Condition="'$(NightlyBuild)' == 'True'">nightly</PreReleaseMilestone> <!-- Overwrite this property for nightly builds from the DEVELOP branch. -->
<!--
Expand All @@ -23,7 +23,7 @@
as it will restart file versions so 2.4.0-beta1 may have higher
file version (like 2.4.0.2222) than 2.4.0-beta2 (like 2.4.0.1111)
-->
<SemanticVersionDate>2022-07-20</SemanticVersionDate>
<SemanticVersionDate>2024-03-15</SemanticVersionDate>

<!--
BuildNumber uniquely identifies all builds (The max allowed value is UInt16.MaxValue = 65535).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<Import Project="$(PropsRoot)\Test.props" />

<PropertyGroup>
<TargetFrameworks>net452;netstandard2.0</TargetFrameworks>
<TargetFrameworks>netstandard2.0</TargetFrameworks>
<TargetFrameworks Condition="$(OS) != 'Windows_NT'">netstandard2.0</TargetFrameworks>
</PropertyGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@

<PropertyGroup>
<!-- TargetFrameworks are defined in Test.props, but can be overridden here if needed. -->
<TargetFrameworks>$(TargetFrameworks_WithLegacy)</TargetFrameworks>

<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
</PropertyGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@
<PropertyGroup>
<!-- TargetFrameworks are defined in Test.props, but can be overridden here if needed. -->
<ProjectGuid>{2759BC71-7F47-44DA-8579-AE2D8C8C684D}</ProjectGuid>
<TargetFrameworks>net46;netcoreapp3.1</TargetFrameworks>
<TargetFrameworks>net462;net6.0</TargetFrameworks>
</PropertyGroup>

<PropertyGroup Condition="$(OS) != 'Windows_NT'">
<EnableDefaultCompileItems>false</EnableDefaultCompileItems>
<TargetFrameworks>netcoreapp3.1</TargetFrameworks>
<TargetFrameworks>net6.0</TargetFrameworks>
</PropertyGroup>

<ItemGroup Condition="$(OS) == 'Windows_NT'">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@

<PropertyGroup>
<!-- TargetFrameworks are defined in Test.props, but can be overridden here if needed. -->
<TargetFrameworks>$(TargetFrameworks_WithLegacy)</TargetFrameworks>

<AssemblyName>Microsoft.ApplicationInsights.TelemetryChannel.Tests</AssemblyName>
</PropertyGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
namespace Microsoft.ApplicationInsights.Extensibility
{
#if NET452
#if NETFRAMEWORK
using System;
using System.Runtime.Remoting.Messaging;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<PropertyGroup>
<RootNamespace>Microsoft.ApplicationInsights</RootNamespace>
<AssemblyName>Microsoft.ApplicationInsights</AssemblyName>
<TargetFrameworks>net452;net46;netstandard2.0</TargetFrameworks>
<TargetFrameworks>net462;netstandard2.0</TargetFrameworks>
<TargetFrameworks Condition="$(OS) != 'Windows_NT'">netstandard2.0</TargetFrameworks>
</PropertyGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ public IPlatformFolder GetApplicationFolder()

internal static bool IsWindowsOperatingSystem()
{
#if NET452
#if NETFRAMEWORK
return true;
#else
if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
Expand Down
4 changes: 2 additions & 2 deletions BASE/src/ServerTelemetryChannel/TelemetryChannel.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<PropertyGroup>
<RootNamespace>Microsoft.ApplicationInsights.WindowsServer.TelemetryChannel</RootNamespace>
<AssemblyName>Microsoft.AI.ServerTelemetryChannel</AssemblyName>
<TargetFrameworks>net452;netstandard2.0</TargetFrameworks>
<TargetFrameworks>net462;netstandard2.0</TargetFrameworks>
<TargetFrameworks Condition="$(OS) != 'Windows_NT'">netstandard2.0</TargetFrameworks>
</PropertyGroup>

Expand All @@ -19,7 +19,7 @@
<ProjectReference Include="..\Microsoft.ApplicationInsights\Microsoft.ApplicationInsights.csproj" />
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'net452'">
<ItemGroup Condition="'$(TargetFramework)' == 'net462'">
<PackageReference Include="Microsoft.Diagnostics.Tracing.EventRegister" Version="1.1.28">
<PrivateAssets>All</PrivateAssets>
</PackageReference>
Expand Down
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<Import Project="$(PropsRoot)\Product.props" />

<PropertyGroup>
<TargetFrameworks>netstandard2.0;net452</TargetFrameworks>
<TargetFrameworks>netstandard2.0</TargetFrameworks>
<RootNamespace>Microsoft.ApplicationInsights.DiagnosticSourceListener</RootNamespace>
<AssemblyName>Microsoft.ApplicationInsights.DiagnosticSourceListener</AssemblyName>
</PropertyGroup>
Expand Down
2 changes: 1 addition & 1 deletion LOGGING/src/EtwCollector/EtwCollector.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<Import Project="$(PropsRoot)\Product.props" />

<PropertyGroup>
<TargetFrameworks>net452</TargetFrameworks>
<TargetFrameworks>net462</TargetFrameworks>
<RootNamespace>Microsoft.ApplicationInsights.EtwCollector</RootNamespace>
<AssemblyName>Microsoft.ApplicationInsights.EtwCollector</AssemblyName>
</PropertyGroup>
Expand Down
2 changes: 1 addition & 1 deletion LOGGING/src/Log4NetAppender/Log4NetAppender.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<Import Project="$(PropsRoot)\Product.props" />

<PropertyGroup>
<TargetFrameworks>net452;netstandard2.0</TargetFrameworks>
<TargetFrameworks>netstandard2.0</TargetFrameworks>
<RootNamespace>Microsoft.ApplicationInsights.Log4NetAppender</RootNamespace>
<AssemblyName>Microsoft.ApplicationInsights.Log4NetAppender</AssemblyName>
</PropertyGroup>
Expand Down
2 changes: 1 addition & 1 deletion LOGGING/src/NLogTarget/NLogTarget.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<Import Project="$(PropsRoot)\Product.props" />

<PropertyGroup>
<TargetFrameworks>net452;netstandard2.0</TargetFrameworks>
<TargetFrameworks>netstandard2.0</TargetFrameworks>
<RootNamespace>Microsoft.ApplicationInsights.NLogTarget</RootNamespace>
<AssemblyName>Microsoft.ApplicationInsights.NLogTarget</AssemblyName>
</PropertyGroup>
Expand Down
2 changes: 1 addition & 1 deletion LOGGING/src/TraceListener/TraceListener.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<Import Project="$(PropsRoot)\Product.props" />

<PropertyGroup>
<TargetFrameworks>net452;netstandard2.0</TargetFrameworks>
<TargetFrameworks>net462;netstandard2.0</TargetFrameworks>
<RootNamespace>Microsoft.ApplicationInsights.TraceListener</RootNamespace>
<AssemblyName>Microsoft.ApplicationInsights.TraceListener</AssemblyName>
</PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<!-- TargetFrameworks are defined in Test.props, but can be overridden here if needed. -->
<RootNamespace>Microsoft.ApplicationInsights.DiagnosticSourceListener.Tests</RootNamespace>
<AssemblyName>Microsoft.ApplicationInsights.DiagnosticSourceListener.Tests</AssemblyName>
<TargetFrameworks>netcoreapp3.1</TargetFrameworks>
<TargetFrameworks>net6.0</TargetFrameworks>
</PropertyGroup>

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion LOGGING/test/EtwCollector.Tests/EtwCollector.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<!-- TargetFrameworks are defined in Test.props, but can be overridden here if needed. -->
<RootNamespace>Microsoft.ApplicationInsights.EtwCollector.Tests</RootNamespace>
<AssemblyName>Microsoft.ApplicationInsights.EtwCollector.Tests</AssemblyName>
<TargetFrameworks>net46</TargetFrameworks>
<TargetFrameworks>net462</TargetFrameworks>
</PropertyGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<!-- TargetFrameworks are defined in Test.props, but can be overridden here if needed. -->
<RootNamespace>Microsoft.ApplicationInsights.EventSourceListener.Tests</RootNamespace>
<AssemblyName>Microsoft.ApplicationInsights.EventSourceListener.Tests</AssemblyName>
<TargetFrameworks>netcoreapp3.1</TargetFrameworks>
<TargetFrameworks>net6.0</TargetFrameworks>
</PropertyGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<!-- TargetFrameworks are defined in Test.props, but can be overridden here if needed. -->
<RootNamespace>Microsoft.ApplicationInsights.Log4NetAppender.Tests</RootNamespace>
<AssemblyName>Microsoft.ApplicationInsights.Log4NetAppender.Tests</AssemblyName>
<TargetFrameworks>net452;netcoreapp3.1</TargetFrameworks>
<TargetFrameworks>net462;net6.0</TargetFrameworks>
</PropertyGroup>

<ItemGroup>
Expand All @@ -17,7 +17,7 @@
<ProjectReference Include="..\..\src\Log4NetAppender\Log4NetAppender.csproj" />
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'net452'">
<ItemGroup Condition="'$(TargetFramework)' == 'net462'">
<Reference Include="System.Net.Http" />
</ItemGroup>

Expand Down
4 changes: 2 additions & 2 deletions LOGGING/test/NLogTarget.Tests/NLogTarget.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<!-- TargetFrameworks are defined in Test.props, but can be overridden here if needed. -->
<RootNamespace>Microsoft.ApplicationInsights.NLogTarget.Tests</RootNamespace>
<AssemblyName>Microsoft.ApplicationInsights.NLogTarget.Tests</AssemblyName>
<TargetFrameworks>net452;netcoreapp3.1</TargetFrameworks>
<TargetFrameworks>net462;net6.0</TargetFrameworks>
</PropertyGroup>

<ItemGroup>
Expand All @@ -17,7 +17,7 @@
<ProjectReference Include="..\..\src\NLogTarget\NLogTarget.csproj" />
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'net452'">
<ItemGroup Condition="'$(TargetFramework)' == 'net462'">
<Reference Include="System.Net.Http" />
</ItemGroup>

Expand Down
4 changes: 2 additions & 2 deletions LOGGING/test/TraceListener.Tests/TraceListener.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<!-- TargetFrameworks are defined in Test.props, but can be overridden here if needed. -->
<RootNamespace>Microsoft.ApplicationInsights.TraceListener.Tests</RootNamespace>
<AssemblyName>Microsoft.ApplicationInsights.TraceListener.Tests</AssemblyName>
<TargetFrameworks>net452;netcoreapp3.1</TargetFrameworks>
<TargetFrameworks>net462;net6.0</TargetFrameworks>
</PropertyGroup>

<ItemGroup>
Expand All @@ -17,7 +17,7 @@
<ProjectReference Include="..\..\src\TraceListener\TraceListener.csproj" />
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'net452'">
<ItemGroup Condition="'$(TargetFramework)' == 'net462'">
<Reference Include="System.Net.Http" />
</ItemGroup>

Expand Down
Loading