Skip to content

Commit

Permalink
#2 Fix support for net4.8
Browse files Browse the repository at this point in the history
  • Loading branch information
sguldmund committed Jan 12, 2024
1 parent 7cba5e4 commit 86eed30
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions src/Pose/Extensions/DictionaryExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ internal static class DictionaryExtensions
{
public static bool TryAdd<TKey, TValue>(this Dictionary<TKey, TValue> dictionary, TKey key, TValue value)
{
#if NETSTANDARD2_0 || NET48
try
{
dictionary.Add(key, value);
Expand All @@ -15,6 +16,9 @@ public static bool TryAdd<TKey, TValue>(this Dictionary<TKey, TValue> dictionary
{
return false;
}
#else
return dictionary.TryAdd(key, value);
#endif
}
}
}
2 changes: 1 addition & 1 deletion src/Pose/Pose.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<Title>Pose</Title>
<Description>Replace any .NET method (including static and non-virtual) with a delegate</Description>
<PackageVersion>1.2.1</PackageVersion>
<TargetFrameworks>netstandard2.0;netstandard2.1</TargetFrameworks>
<TargetFrameworks>netstandard2.0;netcoreapp3.0;net48</TargetFrameworks>
<DebugType>portable</DebugType>
<AssemblyName>Pose</AssemblyName>
<PackageId>Pose</PackageId>
Expand Down
2 changes: 1 addition & 1 deletion test/Pose.Tests/Pose.Tests.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>netcoreapp2.0;netcoreapp3.0;netcoreapp2.1;netcoreapp3.1;net48</TargetFrameworks>
<TargetFrameworks>netcoreapp2.0;netcoreapp3.0;net47;net48</TargetFrameworks>
<IsPackable>false</IsPackable>
</PropertyGroup>

Expand Down

0 comments on commit 86eed30

Please sign in to comment.