diff --git a/csharp/src/Google.Protobuf.Test/JsonParserTest.cs b/csharp/src/Google.Protobuf.Test/JsonParserTest.cs index 69c9eb6e99..8462c83994 100644 --- a/csharp/src/Google.Protobuf.Test/JsonParserTest.cs +++ b/csharp/src/Google.Protobuf.Test/JsonParserTest.cs @@ -553,7 +553,7 @@ namespace Google.Protobuf [Test] // Skip these test cases in .NET 5 because floating point parsing supports bigger values. // These big values won't throw an error in the test. -#if !NET5_0 +#if !NETCOREAPP3_1_OR_GREATER [TestCase("1.7977e308")] [TestCase("-1.7977e308")] [TestCase("1e309")] diff --git a/csharp/src/Google.Protobuf.Test/JsonTokenizerTest.cs b/csharp/src/Google.Protobuf.Test/JsonTokenizerTest.cs index 0cbc0a4ff8..7cc5c6bcfb 100644 --- a/csharp/src/Google.Protobuf.Test/JsonTokenizerTest.cs +++ b/csharp/src/Google.Protobuf.Test/JsonTokenizerTest.cs @@ -201,7 +201,7 @@ namespace Google.Protobuf [TestCase("--1")] // Skip these test cases in .NET 5 because floating point parsing supports bigger values. // These big values won't throw an error in the test. -#if !NET5_0 +#if !NETCOREAPP3_1_OR_GREATER [TestCase("-1.7977e308")] [TestCase("1.7977e308")] #endif