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) 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());