Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ jobs:
run: make check

- name: Run unit tests
run: TARGET_FRAMEWORK=net9 make test-unit
run: TARGET_FRAMEWORK=net9.0 make test-unit

integration-tests:
needs: linting-and-basic-unit-tests
Expand All @@ -60,17 +60,17 @@ jobs:
matrix:
include:
- scylla-version: LTS-LATEST
target-framework: net9
target-framework: net9.0
dotnet-version: '9.0.x'
- scylla-version: LTS-PRIOR
target-framework: net8
target-framework: net8.0
dotnet-version: '8.0.x'
- scylla-version: LATEST
target-framework: net7
dotnet-version: '7.0.x'
- scylla-version: PRIOR
target-framework: net6
dotnet-version: '6.0.x'
target-framework: net8.0
dotnet-version: '8.0.x'
- scylla-version: LATEST
target-framework: net9.0
dotnet-version: '9.0.x'
fail-fast: false

env:
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -88,4 +88,4 @@ AGENTS.md
claude.log
claude_history.json
claude_config.json
CLAUDE.md
CLAUDE.md
19 changes: 8 additions & 11 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -120,29 +120,26 @@ The command `dotnet build src/Cassandra.sln` should succeed. Otherwise, you need
You can build specific projects against specific target frameworks on any platform like this:

```bash
dotnet build src/Cassandra/Cassandra.csproj -f netstandard2.0
dotnet build src/Cassandra.Tests/Cassandra.Tests.csproj -f net8
dotnet build src/Cassandra.IntegrationTests/Cassandra.IntegrationTests.csproj -f net8
dotnet build src/Cassandra/Cassandra.csproj -f net8.0
dotnet build src/Cassandra.Tests/Cassandra.Tests.csproj -f net8.0
dotnet build src/Cassandra.IntegrationTests/Cassandra.IntegrationTests.csproj -f net8.0
```

Alternatively you can set the `BuildCoreOnly` environment variable which will cause the projects to support .NET Core / .NET Standard targets only (you can see the conditions on the `.csproj` files).

### Running Unit Tests

```bash
dotnet test src/Cassandra.Tests/Cassandra.Tests.csproj -f net8
dotnet test src/Cassandra.Tests/Cassandra.Tests.csproj -f net8.0
```

The target framework supported by the test projects is `net8` (by default). If you set the `BuildAllTargets` environment variable, the test projects will support these targets:
The target framework supported by the test projects is `net8.0` (by default). If you set the `BuildAllTargets` environment variable, the test projects will support these targets:

- `net6`
- `net7`(not LTS, might be removed at some point)
- `net8`
- `net8.0`
- `net9.0`

Running the unit tests for a single target should take no more than 5 minutes (usually less):

```bash
dotnet test src/Cassandra.Tests/Cassandra.Tests.csproj -c Release -f net8 -l "console;verbosity=detailed"
dotnet test src/Cassandra.Tests/Cassandra.Tests.csproj -c Release -f net8.0 -l "console;verbosity=detailed"
```

### Running Integration Tests
Expand Down
19 changes: 6 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

ScyllaDB's fork of a modern, [feature-rich][features] and highly tunable C# client library for Scylla using Cassandra's binary protocol and Cassandra Query Language v3.

The driver targets .NET Standard 2.0. For more detailed information about platform compatibility, check [this section](#compatibility).
The driver targets .NET 8.0 and .NET 9.0. For more detailed information about platform compatibility, check [this section](#compatibility).

## Installation

Expand Down Expand Up @@ -237,20 +237,13 @@ ICluster cluster = Cluster.Builder()
- Apache Cassandra versions 2.0 and above.
- ScyllaDB 5.x and above.
- ScyllaDB Enterprise 2021.x and above.
- The driver targets .NET Standard 2.0
- The driver targets .NET 8.0 and .NET 9.0

Here is a list of platforms and .NET targets that Datastax uses when testing this driver:
Here is a list of platforms and .NET targets tested:

| Platform | net6 | net7 | net8 |
|-----------------------|------|------|-------|
| Windows Server 2019³ | ✓² | ✓¹ | ✓ |
| Ubuntu 18.04 | ✓ | ✓ | ✓ |

¹ No tests are run for the `net7` target on the Windows platform but `net7` is still considered fully supported.

² Only unit tests are ran for the `net6` target on the windows platform but `net6` is still considered fully supported.

³ Appveyor's `Visual Studio 2022` image is used for these tests.
| Platform | net8 | net9 |
|-----------------------|------|------|
| Ubuntu 24.04 | ✓ | ✓ |

Note: Big-endian systems are not supported.

Expand Down
2 changes: 1 addition & 1 deletion docs/source/api-docs/docfx.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"disableGitFeatures": false,
"disableDefaultFilter": false,
"properties": {
"TargetFramework": "netstandard2.0"
"TargetFramework": "net8.0"
}
}
],
Expand Down
19 changes: 6 additions & 13 deletions docs/source/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

ScyllaDB's fork of a modern, [feature-rich][features] and highly tunable C# client library for Scylla using Cassandra's binary protocol and Cassandra Query Language v3.

The driver targets .NET Standard 2.0. For more detailed information about platform compatibility, check [this section](#compatibility).
The driver targets .NET 8.0 and .NET 9.0. For more detailed information about platform compatibility, check [this section](#compatibility).

## Installation

Expand Down Expand Up @@ -235,20 +235,13 @@ ICluster cluster = Cluster.Builder()
- ScyllaDB 2025.1 and above.
- ScyllaDB 5.x and above.
- ScyllaDB Enterprise 2021.x and above.
- The driver targets .NET Standard 2.0
- The driver targets .NET 8.0 and .NET 9.0

Here is a list of platforms and .NET targets that Datastax uses when testing this driver:
Here is a list of platforms and .NET targets tested:

| Platform | net6 | net7 | net8 |
|-----------------------|------|------|-------|
| Windows Server 2019³ | ✓² | ✓¹ | ✓ |
| Ubuntu 18.04 | ✓ | ✓ | ✓ |

¹ No tests are run for the `net7` target on the Windows platform but `net7` is still considered fully supported.

² Only unit tests are ran for the `net6` target on the windows platform but `net6` is still considered fully supported.

³ Appveyor's `Visual Studio 2022` image is used for these tests.
| Platform | net8 | net9 |
|-----------------------|------|------|
| Ubuntu 24.04 | ✓ | ✓ |

Note: Big-endian systems are not supported.

Expand Down
36 changes: 36 additions & 0 deletions docs/source/upgrade-guide/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,42 @@ Example: `3.4.1`

These releases only contain bug fixes so they will never contain changes to the driver's public API.

## 4.0 - Target framework changes

### Breaking: Minimum target framework is now .NET 8

The NuGet package targets have changed from `netstandard2.0` to `net8.0;net9.0`. This means:

- **.NET 8** and **.NET 9** applications are fully supported.
- **.NET 6**, **.NET 7**, and **.NET Framework** applications can no longer consume this package.

Applications targeting older runtimes should remain on the 3.x driver series.

This change also applies to the extension packages `Cassandra.AppMetrics` and `Cassandra.OpenTelemetry`, which now target `net8.0;net9.0` instead of `netstandard2.0`.

This change enables the driver to take advantage of modern .NET APIs and performance improvements that are not available under `netstandard2.0`.

### Breaking: `[Serializable]` attribute and serialization constructors removed

The `[Serializable]` attribute has been removed from `DriverException` and `NoHostAvailableException`. The serialization constructors (accepting `SerializationInfo` and `StreamingContext`) have been removed from `DriverException`, `FunctionFailureException`, and `NoHostAvailableException`.

Binary serialization has been obsolete since .NET 5 and is disabled by default in .NET 8+. If your application relies on binary serialization of driver exceptions (e.g., cross-AppDomain marshalling or certain logging frameworks), you will need to update your code.

### Breaking: SSL default protocol changed

The default SSL protocol has changed from `SslProtocols.Tls` (TLS 1.0) to `SslProtocols.None` (OS-negotiated, typically TLS 1.2+). This is the recommended setting for modern .NET applications. If you connect to servers that only support TLS 1.0, you must explicitly set `SSLOptions.SslProtocol` to `SslProtocols.Tls`.

### Breaking: Public API removals

The following public APIs have been removed:

- `PlatformHelper.GetTargetFramework()`
- `PlatformHelper.RuntimeSupportsCloudTlsSettings()`
- `PlatformHelper.GetNetCoreVersion()`
- `CloudSupportedAttribute`

These APIs were used internally for multi-target framework support and are no longer needed now that the driver targets only .NET 8+.

## 3.13.0 - Unified driver

A new load balancing policy has been added: `DefaultLoadBalancingPolicy`. This is the new default load balancing policy in the driver. The behavior is the same as the previous default policy except for some DSE specific workloads so there is no impact for existing applications.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,14 @@ You can should replace the project reference with the package reference of the d
-->
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net8</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<RootNamespace>ColumnEncryptionExample</RootNamespace>
<AssemblyName>ColumnEncryptionExample</AssemblyName>
</PropertyGroup>

<!--This example uses a project reference. In your project use PackageReference (nuget)-->
<ItemGroup>
<ProjectReference Include="..\..\..\src\Cassandra\Cassandra.csproj">
<SetTargetFramework>TargetFramework=netstandard2.0</SetTargetFramework>
</ProjectReference>
<ProjectReference Include="..\..\..\src\Cassandra\Cassandra.csproj" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,14 @@ You can should replace the project reference with the package reference of the d
-->
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net8</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<RootNamespace>ExecuteInLoop</RootNamespace>
<AssemblyName>ExecuteInLoop</AssemblyName>
</PropertyGroup>

<!--This example uses a project reference. In your project use PackageReference (nuget)-->
<ItemGroup>
<ProjectReference Include="..\..\..\src\Cassandra\Cassandra.csproj">
<SetTargetFramework>TargetFramework=netstandard2.0</SetTargetFramework>
</ProjectReference>
<ProjectReference Include="..\..\..\src\Cassandra\Cassandra.csproj" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,11 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net8</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
</PropertyGroup>

<ItemGroup>
<ProjectReference Include="..\..\..\src\Cassandra\Cassandra.csproj">
<SetTargetFramework>TargetFramework=netstandard2.0</SetTargetFramework>
</ProjectReference>
<ProjectReference Include="..\..\..\src\Cassandra\Cassandra.csproj" />
</ItemGroup>

</Project>
10 changes: 3 additions & 7 deletions examples/Metrics/AppMetricsGraphite/AppMetricsGraphite.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net8</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
</PropertyGroup>

<ItemGroup>
Expand All @@ -12,12 +12,8 @@

<!--This example uses project references. In your project use PackageReference (nuget)-->
<ItemGroup>
<ProjectReference Include="..\..\..\src\Cassandra\Cassandra.csproj">
<SetTargetFramework>TargetFramework=netstandard2.0</SetTargetFramework>
</ProjectReference>
<ProjectReference Include="..\..\..\src\Extensions\Cassandra.AppMetrics\Cassandra.AppMetrics.csproj">
<SetTargetFramework>TargetFramework=netstandard2.0</SetTargetFramework>
</ProjectReference>
<ProjectReference Include="..\..\..\src\Cassandra\Cassandra.csproj" />
<ProjectReference Include="..\..\..\src\Extensions\Cassandra.AppMetrics\Cassandra.AppMetrics.csproj" />
</ItemGroup>

</Project>
8 changes: 2 additions & 6 deletions examples/OpenTelemetry/DistributedTracing/Api/Api.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,8 @@
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\..\..\..\src\Cassandra\Cassandra.csproj">
<SetTargetFramework>TargetFramework=netstandard2.0</SetTargetFramework>
</ProjectReference>
<ProjectReference Include="..\..\..\..\src\Extensions\Cassandra.OpenTelemetry\Cassandra.OpenTelemetry.csproj">
<SetTargetFramework>TargetFramework=netstandard2.0</SetTargetFramework>
</ProjectReference>
<ProjectReference Include="..\..\..\..\src\Cassandra\Cassandra.csproj" />
<ProjectReference Include="..\..\..\..\src\Extensions\Cassandra.OpenTelemetry\Cassandra.OpenTelemetry.csproj" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,8 @@
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\..\..\..\src\Cassandra\Cassandra.csproj">
<SetTargetFramework>TargetFramework=netstandard2.0</SetTargetFramework>
</ProjectReference>
<ProjectReference Include="..\..\..\..\src\Extensions\Cassandra.OpenTelemetry\Cassandra.OpenTelemetry.csproj">
<SetTargetFramework>TargetFramework=netstandard2.0</SetTargetFramework>
</ProjectReference>
<ProjectReference Include="..\..\..\..\src\Cassandra\Cassandra.csproj" />
<ProjectReference Include="..\..\..\..\src\Extensions\Cassandra.OpenTelemetry\Cassandra.OpenTelemetry.csproj" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ You can should replace the project reference with the package reference of the d
-->
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net8</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
</PropertyGroup>

<!--This example uses a project reference. In your project use PackageReference (nuget)-->
Expand Down
2 changes: 1 addition & 1 deletion examples/Ssl/SslServerAuthOnly/SslServerAuthOnly.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net8</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
</PropertyGroup>

<!--This example uses a project reference. In your project use PackageReference (nuget)-->
Expand Down
2 changes: 1 addition & 1 deletion examples/Ssl/SslTwoWayAuth/SslTwoWayAuth.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net8</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
</PropertyGroup>

<!--This example uses a project reference. In your project use PackageReference (nuget)-->
Expand Down
Loading
Loading