Skip to content

Commit

Permalink
Drop support for .NET Framework 4.6.1 in favor or .NET Framework 4.6.2 (
Browse files Browse the repository at this point in the history
  • Loading branch information
augustoproiete authored Nov 15, 2022
1 parent 60ef581 commit 12179b2
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 18 deletions.
2 changes: 1 addition & 1 deletion sample/SampleConsole/SampleConsole.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFrameworks>net7.0;net6.0;net5.0;netcoreapp3.1;net461</TargetFrameworks>
<TargetFrameworks>net7.0;net6.0;net5.0;netcoreapp3.1;net462</TargetFrameworks>
</PropertyGroup>

<ItemGroup>
Expand Down
8 changes: 4 additions & 4 deletions src/NaturalStringExtensions/NaturalStringComparer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

using System.Collections.Generic;
using System.ComponentModel;
#if !NETSTANDARD2_0 && !NETFRAMEWORK_461
#if !NETSTANDARD2_0 && !NETFRAMEWORK_462
using System.Diagnostics.CodeAnalysis;
#endif

Expand Down Expand Up @@ -131,7 +131,7 @@ public int Compare(string? left, string? right)

while (leftSegments.MoveNext() && rightSegments.MoveNext())
{
#if NETSTANDARD2_0 || NETFRAMEWORK_461
#if NETSTANDARD2_0 || NETFRAMEWORK_462
var leftIsNumber = int.TryParse(leftSegments.Current.ToString(), out var leftValue);
var rightIsNumber = int.TryParse(rightSegments.Current.ToString(), out var rightValue);
#else
Expand Down Expand Up @@ -273,7 +273,7 @@ public bool Equals(string? x, string? y)
}

/// <inheritdoc/>
#if NETSTANDARD2_0 || NETFRAMEWORK_461
#if NETSTANDARD2_0 || NETFRAMEWORK_462
public int GetHashCode(string? obj)
#else
public int GetHashCode([DisallowNull] string? obj)
Expand All @@ -284,7 +284,7 @@ public int GetHashCode([DisallowNull] string? obj)
throw new ArgumentNullException(nameof(obj));
}

#if NETSTANDARD2_0 || NETFRAMEWORK_461
#if NETSTANDARD2_0 || NETFRAMEWORK_462
return obj.GetHashCode();
#else
if (_comparer is null)
Expand Down
10 changes: 5 additions & 5 deletions src/NaturalStringExtensions/NaturalStringExtensions.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net7.0;net6.0;net5.0;netstandard2.0;net461</TargetFrameworks>
<TargetFrameworks>net7.0;net6.0;net5.0;netstandard2.0;net462</TargetFrameworks>

<AssemblyName>NaturalStringExtensions</AssemblyName>
<AssemblyVersion>0.0.1.0</AssemblyVersion>
Expand Down Expand Up @@ -41,16 +41,16 @@
<RepositoryUrl>https://github.com/augustoproiete/NaturalStringExtensions.git</RepositoryUrl>
</PropertyGroup>

<PropertyGroup Condition=" '$(TargetFramework)' == 'net461' ">
<PropertyGroup Condition=" '$(TargetFramework)' == 'net462' ">
<DisableImplicitFrameworkReferences>true</DisableImplicitFrameworkReferences>
<DefineConstants>$(DefineConstants);NETFRAMEWORK_461</DefineConstants>
<DefineConstants>$(DefineConstants);NETFRAMEWORK_462</DefineConstants>
</PropertyGroup>

<PropertyGroup Condition=" '$(TargetFramework)' == 'netstandard2.0' ">
<DefineConstants>$(DefineConstants);NETSTANDARD2_0</DefineConstants>
</PropertyGroup>

<ItemGroup Condition=" '$(TargetFramework)' == 'net461' ">
<ItemGroup Condition=" '$(TargetFramework)' == 'net462' ">
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="Microsoft.CSharp" />
Expand All @@ -74,7 +74,7 @@
<PackageReference Include="System.Memory" Version="4.5.5" />
</ItemGroup>

<ItemGroup Condition=" '$(TargetFramework)' == 'net461' ">
<ItemGroup Condition=" '$(TargetFramework)' == 'net462' ">
<PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies" Version="1.0.3" PrivateAssets="All" />
<PackageReference Include="System.Memory" Version="4.5.5" />
</ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,32 +1,32 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net7.0;net6.0;net5.0;netcoreapp3.1;net461</TargetFrameworks>
<TargetFrameworks>net7.0;net6.0;net5.0;netcoreapp3.1;net462</TargetFrameworks>
<IsPackable>false</IsPackable>
</PropertyGroup>

<PropertyGroup Condition=" '$(TargetFramework)' == 'net461' ">
<DefineConstants>$(DefineConstants);NETFRAMEWORK_461</DefineConstants>
<PropertyGroup Condition=" '$(TargetFramework)' == 'net462' ">
<DefineConstants>$(DefineConstants);NETFRAMEWORK_462</DefineConstants>
</PropertyGroup>

<PropertyGroup Condition=" '$(TargetFramework)' == 'netcoreapp3.1' ">
<DefineConstants>$(DefineConstants);NETCOREAPP3_1</DefineConstants>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.1.0" />
<PackageReference Include="Microsoft.TestPlatform.ObjectModel" Version="17.1.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.4.0" />
<PackageReference Include="Microsoft.TestPlatform.ObjectModel" Version="17.4.0" />
<PackageReference Include="xunit" Version="2.4.2" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.3">
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.5">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="Xunit.SkippableFact" Version="1.4.13" />
<PackageReference Include="coverlet.collector" Version="3.1.2">
<PackageReference Include="coverlet.collector" Version="3.2.0">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="FluentAssertions" Version="6.7.0" />
<PackageReference Include="FluentAssertions" Version="6.8.0" />
</ItemGroup>

<ItemGroup>
Expand Down

0 comments on commit 12179b2

Please sign in to comment.