Skip to content

Commit 8448fcf

Browse files
authored
Add .NET 6.0 multi-targeting support to .NET SDK (#53)
- Add net6.0 as additional target framework alongside net8.0 - Remove 'required' keyword from TestServerOptions properties for .NET 6.0 compatibility - Bump version to 0.1.4 - Use default empty string initialization instead of required properties This enables the SDK to work with both .NET 6.0 and .NET 8.0 projects.
1 parent 0b94d82 commit 8448fcf

2 files changed

Lines changed: 7 additions & 7 deletions

File tree

sdks/dotnet/TestServerSdk.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,12 @@ namespace TestServerSdk
2727
{
2828
public class TestServerOptions
2929
{
30-
public required string ConfigPath { get; set; }
31-
public required string RecordingDir { get; set; }
32-
public required string Mode { get; set; } // "record" or "replay"
33-
public required string BinaryPath { get; set; }
30+
public string ConfigPath { get; set; } = "";
31+
public string RecordingDir { get; set; } = "";
32+
public string Mode { get; set; } = ""; // "record" or "replay"
33+
public string BinaryPath { get; set; } = "";
3434

35-
public string TestServerSecrets { get; set; }
35+
public string? TestServerSecrets { get; set; }
3636

3737
public Action<string>? OnStdOut { get; set; }
3838
public Action<string>? OnStdErr { get; set; }

sdks/dotnet/TestServerSdk.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22
<PropertyGroup>
3-
<TargetFramework>net8.0</TargetFramework>
3+
<TargetFrameworks>net6.0;net8.0</TargetFrameworks>
44
<LangVersion>latest</LangVersion>
55
<Nullable>enable</Nullable>
66
<ImplicitUsings>enable</ImplicitUsings>
77

8-
<PackageVersion>0.1.3</PackageVersion>
8+
<PackageVersion>0.1.4</PackageVersion>
99
<Authors>Google LLC</Authors>
1010
<Description>A .NET SDK to manage the test-server process for integration testing.</Description>
1111
<PackageProjectUrl>https://github.com/google/test-server</PackageProjectUrl>

0 commit comments

Comments
 (0)