From fe8cb5349450e6db1d78eb9772ad674d8730bb03 Mon Sep 17 00:00:00 2001 From: yyyu-google Date: Mon, 13 Oct 2025 20:51:22 -0700 Subject: [PATCH] Add .NET 6.0 multi-targeting support to .NET SDK - 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. --- sdks/dotnet/TestServerSdk.cs | 10 +++++----- sdks/dotnet/TestServerSdk.csproj | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/sdks/dotnet/TestServerSdk.cs b/sdks/dotnet/TestServerSdk.cs index 251b021..9e26e62 100644 --- a/sdks/dotnet/TestServerSdk.cs +++ b/sdks/dotnet/TestServerSdk.cs @@ -27,12 +27,12 @@ namespace TestServerSdk { public class TestServerOptions { - public required string ConfigPath { get; set; } - public required string RecordingDir { get; set; } - public required string Mode { get; set; } // "record" or "replay" - public required string BinaryPath { get; set; } + public string ConfigPath { get; set; } = ""; + public string RecordingDir { get; set; } = ""; + public string Mode { get; set; } = ""; // "record" or "replay" + public string BinaryPath { get; set; } = ""; - public string TestServerSecrets { get; set; } + public string? TestServerSecrets { get; set; } public Action? OnStdOut { get; set; } public Action? OnStdErr { get; set; } diff --git a/sdks/dotnet/TestServerSdk.csproj b/sdks/dotnet/TestServerSdk.csproj index 300e6e7..7e91db2 100644 --- a/sdks/dotnet/TestServerSdk.csproj +++ b/sdks/dotnet/TestServerSdk.csproj @@ -1,11 +1,11 @@ - net8.0 + net6.0;net8.0 latest enable enable - 0.1.3 + 0.1.4 Google LLC A .NET SDK to manage the test-server process for integration testing. https://github.com/google/test-server