Skip to content

Commit 14d4c71

Browse files
committed
build: Set library targets to .NET Standard 2.0 & 2.1, .NET Core 3.1, 6.0-9.0
1 parent ce3bb79 commit 14d4c71

File tree

4 files changed

+21
-15
lines changed

4 files changed

+21
-15
lines changed

CHANGELOG.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@
33
### 2025-06-10 v5.0.0
44

55
* feat: branched off and removed LINQ project, as it is unlikely to become production ready in the new future
6-
* build: simplified library target to .NET Standard 2.0 for maximum compatibility.
7-
* build: remove unsupported frameworks, separately test each supported framework target
86
* test: updated functional test in NullValueTests to avoid duplicate error on create
97
* test: updated packages, updated deprecated async void methods
10-
* test: Tests target .NET Core 6.0-9.0
8+
* build, test, and target updates
9+
- Set library targets to .NET Standard 2.0 & 2.1, .NET Core 3.1, 6.0-9.0
10+
- Tests target .NET Core 6.0-9.0
1111

1212
### 2025-02-24 v5.0.0-Beta
1313

README.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,11 @@
33
## A .NET Standard and .NET Core Salesforce REST API integration library
44
*This project is not offered, sponsored, or endorsed by Salesforce.*
55

6-
Targets .NET Standard 2.0 - this means it will be generally compatible with .NET Framework 4.6.1+ and .NET Core 2.0+
7-
For more info on .NET Standard 2.0 compatiblity [see the Microsoft documentation here](https://learn.microsoft.com/en-us/dotnet/standard/net-standard?tabs=net-standard-2-0)
6+
Targets:
7+
- .NET Standard 2.0 : widest possible support including .NET Framework 4.6.1+ and .NET Core 2.0+
8+
- .NET Standard 2.1 : for newer .NET Core versions
9+
10+
For more info on .NET Standard compatiblity [see the Microsoft documentation here](https://learn.microsoft.com/en-us/dotnet/standard/net-standard?tabs=net-standard-2-0)
811

912
Full tested support is for .NET Core 6.0 - 9.0 as tooling and tests target those.
1013

build.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
</PropertyGroup>
2525

2626
<PropertyGroup>
27-
<LibTargetFrameworks>netstandard2.0</LibTargetFrameworks>
27+
<LibTargetFrameworks>netstandard2.0;netstandard2.1;netcoreapp3.1;net5.0;net6.0;net7.0;net8.0;net9.0</LibTargetFrameworks>
2828
<AppTargetFrameworks>net6.0;net7.0;net8.0;net9.0</AppTargetFrameworks>
2929
<TestTargetFrameworks>net6.0;net7.0;net8.0;net9.0</TestTargetFrameworks>
3030
</PropertyGroup>

src/NetCoreForce.Client/NetCoreForce.Client.csproj

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -42,28 +42,31 @@
4242
<PackageOutputPath>$(SolutionDir)/packages</PackageOutputPath>
4343
</PropertyGroup>
4444

45-
<ItemGroup Condition=" '$(TargetFramework)' == 'netstandard2.0' or '$(TargetFramework)' == 'net461' ">
46-
<!-- Adds async support for .netstandard2.0 clients -->
47-
<PackageReference Include="Microsoft.Bcl.AsyncInterfaces" Version="7.0.0" />
45+
<!-- Adds async support for .NET Standard 2.0, .NET Framework, and .NET Core < 3.0 -->
46+
<ItemGroup Condition=" $(TargetFramework) == 'netstandard2.0' OR $(TargetFramework.StartsWith('net4')) ">
47+
<PackageReference Include="Microsoft.Bcl.AsyncInterfaces" Version="9.0.6" />
4848
</ItemGroup>
4949

5050
<Choose>
51-
52-
<When Condition=" '$(TargetFramework)' == 'NET8_0_OR_GREATER'">
51+
<When Condition=" $(TargetFramework) == 'netcoreapp3.1' OR $(TargetFramework) == 'net5.0' ">
5352
<ItemGroup>
54-
<PackageReference Include="System.Text.Encodings.Web" Version="9.0.6" />
53+
<PackageReference Include="System.Text.Encodings.Web" Version="6.0.0" />
5554
</ItemGroup>
5655
</When>
57-
58-
<Otherwise>
56+
<When Condition=" $(TargetFramework) == 'net6.0' OR $(TargetFramework) == 'net7.0'">
5957
<ItemGroup>
6058
<PackageReference Include="System.Text.Encodings.Web" Version="8.0.0" />
6159
</ItemGroup>
60+
</When>
61+
<Otherwise>
62+
<ItemGroup>
63+
<PackageReference Include="System.Text.Encodings.Web" Version="9.0.6" />
64+
</ItemGroup>
6265
</Otherwise>
63-
6466
</Choose>
6567

6668
<ItemGroup>
6769
<PackageReference Include="Newtonsoft.Json" Version="13.0.2" />
6870
</ItemGroup>
71+
6972
</Project>

0 commit comments

Comments
 (0)