Skip to content

Commit 85d5871

Browse files
authored
re add net462 (#613)
1 parent 310ccfe commit 85d5871

File tree

4 files changed

+11
-9
lines changed

4 files changed

+11
-9
lines changed

src/DiffEngine/DiffEngine.csproj

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22
<PropertyGroup>
3-
<TargetFrameworks Condition=" '$(OS)' == 'Windows_NT'">net472;net48;net9.0</TargetFrameworks>
3+
<TargetFrameworks Condition=" '$(OS)' == 'Windows_NT'">net462;net472;net48;net9.0</TargetFrameworks>
44
<TargetFrameworks>$(TargetFrameworks);net6.0;net7.0;net8.0;net9.0</TargetFrameworks>
55
</PropertyGroup>
66
<ItemGroup>
@@ -12,6 +12,8 @@
1212
<Using Include="System.Net.Sockets" />
1313
<Using Include="EmptyFiles" />
1414
<Using Include="System.ReadOnlySpan&lt;System.Char&gt;" Alias="CharSpan" />
15+
<PackageReference Include="System.Runtime.InteropServices.RuntimeInformation"
16+
Condition="'$(TargetFramework)' == 'net462' OR '$(TargetFramework)' == 'net472'" />
1517
<PackageReference Include="Caseless.Fody" PrivateAssets="All" />
1618
<PackageReference Include="EmptyFiles" PrivateAssets="None" />
1719
<PackageReference Include="Fody" PrivateAssets="all" />

src/DiffEngine/OsSettingsResolver.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,19 +27,19 @@ public static bool Resolve(
2727
[NotNullWhen(true)] out string? path,
2828
[NotNullWhen(true)] out LaunchArguments? launchArguments)
2929
{
30-
if (TryResolveForOs(tool, osSupport.Windows, out path, OSPlatform.Windows))
30+
if (TryResolveForOs(tool, osSupport.Windows, out path, "WINDOWS"))
3131
{
3232
launchArguments = osSupport.Windows.LaunchArguments;
3333
return true;
3434
}
3535

36-
if (TryResolveForOs(tool, osSupport.Linux, out path, OSPlatform.Linux))
36+
if (TryResolveForOs(tool, osSupport.Linux, out path, "LINUX"))
3737
{
3838
launchArguments = osSupport.Linux.LaunchArguments;
3939
return true;
4040
}
4141

42-
if (TryResolveForOs(tool, osSupport.Osx, out path, OSPlatform.OSX))
42+
if (TryResolveForOs(tool, osSupport.Osx, out path, "OSX"))
4343
{
4444
launchArguments = osSupport.Osx.LaunchArguments;
4545
return true;
@@ -54,11 +54,11 @@ static bool TryResolveForOs(
5454
string tool,
5555
[NotNullWhen(true)] OsSettings? os,
5656
[NotNullWhen(true)] out string? path,
57-
OSPlatform platform)
57+
string platform)
5858
{
5959
path = null;
6060

61-
if (os == null || !RuntimeInformation.IsOSPlatform(platform))
61+
if (os == null || !OperatingSystemPolyfill.IsOSPlatform(platform))
6262
{
6363
return false;
6464
}

src/Directory.Build.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<Project>
33
<PropertyGroup>
44
<NoWarn>CS1591;CS0649</NoWarn>
5-
<Version>15.10.1</Version>
5+
<Version>15.11.0</Version>
66
<AssemblyVersion>1.0.0</AssemblyVersion>
77
<PackageTags>Testing, Snapshot, Diff, Compare</PackageTags>
88
<Description>Launches diff tools based on file extensions. Designed to be consumed by snapshot testing libraries.</Description>

src/Directory.Packages.props

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44
<CentralPackageTransitivePinningEnabled>true</CentralPackageTransitivePinningEnabled>
55
</PropertyGroup>
66
<ItemGroup>
7-
<PackageVersion Include="Argon" Version="0.26.0" />
7+
<PackageVersion Include="Argon" Version="0.27.0" />
88
<PackageVersion Include="Caseless.Fody" Version="1.9.1" />
9-
<PackageVersion Include="EmptyFiles" Version="8.7.1" />
9+
<PackageVersion Include="EmptyFiles" Version="8.8.0" />
1010
<PackageVersion Include="Fody" Version="6.9.2" />
1111
<PackageVersion Include="MarkdownSnippets.MsBuild" Version="27.0.2" />
1212
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.13.0" />

0 commit comments

Comments
 (0)