From 73b7ac1dddd64bdbc73a504ad7eca356426c21d7 Mon Sep 17 00:00:00 2001 From: Scott Wallace Date: Thu, 30 Nov 2023 12:40:42 -0500 Subject: [PATCH 1/2] Fixes #3829 Producing incompatible is not null check --- src/Kiota.Builder/Writers/CSharp/CSharpConventionService.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Kiota.Builder/Writers/CSharp/CSharpConventionService.cs b/src/Kiota.Builder/Writers/CSharp/CSharpConventionService.cs index cbb4497fc4..f7197d2894 100644 --- a/src/Kiota.Builder/Writers/CSharp/CSharpConventionService.cs +++ b/src/Kiota.Builder/Writers/CSharp/CSharpConventionService.cs @@ -96,7 +96,7 @@ internal void AddParametersAssignment(LanguageWriter writer, CodeTypeBase pathPa if (nameof(String).Equals(ct.Name, StringComparison.OrdinalIgnoreCase)) nullCheck = $"if (!string.IsNullOrWhiteSpace({identName})) "; else - nullCheck = $"if ({identName} is not null) "; + nullCheck = $"if ({identName} != null) "; } return $"{nullCheck}{varName}.Add(\"{name}\", {identName});"; }).ToArray()); From 1037ebf8221dba2d4bac88d8c7ef132168c53109 Mon Sep 17 00:00:00 2001 From: Vincent Biret Date: Thu, 30 Nov 2023 13:08:47 -0500 Subject: [PATCH 2/2] - adds changelog entry for csharp standard --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index b803f09109..e4d53e62b4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -19,6 +19,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Fixed a bug where path parameters deduplication would create collisions on sub path segments. [#3757](https://github.com/microsoft/kiota/issues/3757) - Moved from net7 to net8. - Removed windows OS from docker multi-partform image to align with [dotnet changes](https://github.com/dotnet/dotnet-docker/issues/4492). +- Fixed a bug where the emitted CSharp would not be compatible with netstandad2.0. [#3829](https://github.com/microsoft/kiota/issues/3829) - Fixed a bug where import statements for additionalDataHolder and enumSet are missing when BackingStore is enabled in java. [#3643](https://github.com/microsoft/kiota/pull/3643) - Fixed an issue where Kiota's regex's might time out. [#3797](https://github.com/microsoft/kiota/issues/3797) - Fixed a bug where getBackingStore method body was malformed for java. [#3643](https://github.com/microsoft/kiota/pull/3643)