Skip to content
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

add support for Net462 #2277

Closed
wants to merge 16 commits into from
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<Import Project="$(PropsRoot)\Test.props" />

<PropertyGroup>
<TargetFrameworks>net452;net46;net461;netcoreapp2.1;netcoreapp3.1;net5.0</TargetFrameworks>
<TargetFrameworks>net452;net46;net461;net462;netcoreapp2.1;netcoreapp3.1;net5.0</TargetFrameworks>
<TargetFrameworks Condition="$(OS) != 'Windows_NT'">netcoreapp2.1;netcoreapp3.1</TargetFrameworks>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
</PropertyGroup>
Expand All @@ -28,8 +28,8 @@
<PackageReference Include="System.Runtime.InteropServices.RuntimeInformation" Version="4.3.0" />
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'net452' Or '$(TargetFramework)' == 'net46' Or '$(TargetFramework)' == 'net461' ">
<PackageReference Include="Microsoft.Diagnostics.Tracing.TraceEvent" Version="2.0.30" />
<ItemGroup Condition="'$(TargetFramework)' == 'net452' Or '$(TargetFramework)' == 'net46' Or '$(TargetFramework)' == 'net461' Or '$(TargetFramework)' == 'net462'">
<PackageReference Include="Microsoft.Diagnostics.Tracing.TraceEvent" Version="2.0.68" />

<Reference Include="Microsoft.CSharp" />
<Reference Include="System" />
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;netcoreapp2.1;netcoreapp3.1</TargetFrameworks>
<TargetFrameworks>net452;net462;netcoreapp2.1;netcoreapp3.1</TargetFrameworks>
<TargetFrameworks Condition="$(OS) != 'Windows_NT'">netcoreapp2.1;netcoreapp3.1</TargetFrameworks>

<AssemblyName>Microsoft.ApplicationInsights.TelemetryChannel.Tests</AssemblyName>
Expand All @@ -29,7 +29,7 @@
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="2.2.0" />
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'net452'">
<ItemGroup Condition="'$(TargetFramework)' == 'net452' Or '$(TargetFramework)' == 'net462'">
<PackageReference Include="System.Runtime.InteropServices.RuntimeInformation" Version="4.3.0" />
<Reference Include="System.Web" />
<Reference Include="System.Net.Http" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ public Task<bool> SetDefaultPayload(IEnumerable<string> disabledFields, IHeartbe
/// <returns>a string representing the version of the current .NET framework.</returns>
private static string GetRuntimeFrameworkVer()
{
#if NET452 || NET46
#if NET452 || NET46 || NET462
TimothyMothra marked this conversation as resolved.
Show resolved Hide resolved
Assembly assembly = typeof(Object).GetTypeInfo().Assembly;
AssemblyFileVersionAttribute objectAssemblyFileVer =
assembly.GetCustomAttributes(typeof(AssemblyFileVersionAttribute))
Expand All @@ -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 All @@ -127,7 +129,7 @@ private static string GetBaseSdkTargetFramework()
private static string GetRuntimeOsType()
{
string osValue = "unknown";
#if NET452 || NET46
#if NET452 || NET46 || NET462

osValue = Environment.OSVersion.Platform.ToString();

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>net452;net46;net462;netstandard2.0</TargetFrameworks>
TimothyMothra marked this conversation as resolved.
Show resolved Hide resolved
<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 NET452 || NET462
TimothyMothra marked this conversation as resolved.
Show resolved Hide resolved
return true;
#else
if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
Expand Down
6 changes: 3 additions & 3 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>net452;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)' == 'net452' Or '$(TargetFramework)' == 'net462'">
<PackageReference Include="Microsoft.Diagnostics.Tracing.EventRegister" Version="1.1.28">
<PrivateAssets>All</PrivateAssets>
</PackageReference>
Expand All @@ -44,4 +44,4 @@
<PackageReference Include="System.IO.FileSystem.AccessControl" Version="4.7.0" />
</ItemGroup>

</Project>
</Project>