diff --git a/docs/generators/aspnetcore.md b/docs/generators/aspnetcore.md
index 814ed0d4bd2f..93d544bb4576 100644
--- a/docs/generators/aspnetcore.md
+++ b/docs/generators/aspnetcore.md
@@ -116,6 +116,9 @@ These options may be applied as additional-properties (cli) or configOptions (pl
- Client
- Configuration
+- Environment
+- OperatingSystem
+- TimeZone
- Version
- abstract
- as
diff --git a/docs/generators/csharp-functions.md b/docs/generators/csharp-functions.md
index 8faf39035852..b404eed8cb3c 100644
--- a/docs/generators/csharp-functions.md
+++ b/docs/generators/csharp-functions.md
@@ -109,6 +109,9 @@ These options may be applied as additional-properties (cli) or configOptions (pl
- Client
- Configuration
+- Environment
+- OperatingSystem
+- TimeZone
- Version
- abstract
- as
diff --git a/docs/generators/csharp.md b/docs/generators/csharp.md
index 54ee3942c724..09d2bc30c489 100644
--- a/docs/generators/csharp.md
+++ b/docs/generators/csharp.md
@@ -115,6 +115,9 @@ These options may be applied as additional-properties (cli) or configOptions (pl
- Client
- Configuration
+- Environment
+- OperatingSystem
+- TimeZone
- Version
- abstract
- as
diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractCSharpCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractCSharpCodegen.java
index 871dd608322b..b458f6aeba60 100644
--- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractCSharpCodegen.java
+++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractCSharpCodegen.java
@@ -136,7 +136,8 @@ public AbstractCSharpCodegen() {
// set "client" as a reserved word to avoid conflicts with Org.OpenAPITools.Client
// this is a workaround and can be removed if c# api client is updated to use
// fully qualified name
- "Client", "client", "parameter", "Configuration", "Version",
+ "Client", "client", "parameter", "Configuration", "Version", "Environment",
+ "TimeZone", "OperatingSystem",
// local variable names in API methods (endpoints)
"localVarPath", "localVarPathParams", "localVarQueryParams", "localVarHeaderParams",
"localVarFormParams", "localVarFileParams", "localVarStatusCode", "localVarResponse",
diff --git a/modules/openapi-generator/src/main/resources/csharp/netcore_project.mustache b/modules/openapi-generator/src/main/resources/csharp/netcore_project.mustache
index eeabe98a3963..8e10231c87eb 100644
--- a/modules/openapi-generator/src/main/resources/csharp/netcore_project.mustache
+++ b/modules/openapi-generator/src/main/resources/csharp/netcore_project.mustache
@@ -43,7 +43,7 @@
{{/useGenericHost}}
{{^useGenericHost}}
{{#supportsRetry}}
-
+
{{/supportsRetry}}
{{/useGenericHost}}
{{#validatable}}
diff --git a/modules/openapi-generator/src/main/resources/csharp/netcore_testproject.mustache b/modules/openapi-generator/src/main/resources/csharp/netcore_testproject.mustache
index c55be486465b..a5dfece921fe 100644
--- a/modules/openapi-generator/src/main/resources/csharp/netcore_testproject.mustache
+++ b/modules/openapi-generator/src/main/resources/csharp/netcore_testproject.mustache
@@ -10,8 +10,8 @@
-
-
+
+
diff --git a/modules/openapi-generator/src/main/resources/csharp/nuspec.mustache b/modules/openapi-generator/src/main/resources/csharp/nuspec.mustache
index 356b9079d076..18fe4aacc874 100644
--- a/modules/openapi-generator/src/main/resources/csharp/nuspec.mustache
+++ b/modules/openapi-generator/src/main/resources/csharp/nuspec.mustache
@@ -42,7 +42,7 @@
{{/validatable}}
{{#supportsRetry}}
-
+
{{/supportsRetry}}
diff --git a/samples/client/echo_api/csharp-restsharp/src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj b/samples/client/echo_api/csharp-restsharp/src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj
index 254c08a55838..66408e8d3281 100644
--- a/samples/client/echo_api/csharp-restsharp/src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj
+++ b/samples/client/echo_api/csharp-restsharp/src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj
@@ -10,8 +10,8 @@
-
-
+
+
diff --git a/samples/client/echo_api/csharp-restsharp/src/Org.OpenAPITools/Org.OpenAPITools.csproj b/samples/client/echo_api/csharp-restsharp/src/Org.OpenAPITools/Org.OpenAPITools.csproj
index 89948381e2ee..addc6411ef6b 100644
--- a/samples/client/echo_api/csharp-restsharp/src/Org.OpenAPITools/Org.OpenAPITools.csproj
+++ b/samples/client/echo_api/csharp-restsharp/src/Org.OpenAPITools/Org.OpenAPITools.csproj
@@ -24,7 +24,7 @@
-
+
diff --git a/samples/client/others/csharp-complex-files/src/Org.OpenAPITools/Org.OpenAPITools.csproj b/samples/client/others/csharp-complex-files/src/Org.OpenAPITools/Org.OpenAPITools.csproj
index 8662fc819fc7..6064f45f6dd4 100644
--- a/samples/client/others/csharp-complex-files/src/Org.OpenAPITools/Org.OpenAPITools.csproj
+++ b/samples/client/others/csharp-complex-files/src/Org.OpenAPITools/Org.OpenAPITools.csproj
@@ -24,7 +24,7 @@
-
+
diff --git a/samples/client/petstore/csharp-restsharp-name-parameter-mappings/src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj b/samples/client/petstore/csharp-restsharp-name-parameter-mappings/src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj
index 254c08a55838..66408e8d3281 100644
--- a/samples/client/petstore/csharp-restsharp-name-parameter-mappings/src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj
+++ b/samples/client/petstore/csharp-restsharp-name-parameter-mappings/src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj
@@ -10,8 +10,8 @@
-
-
+
+
diff --git a/samples/client/petstore/csharp-restsharp-name-parameter-mappings/src/Org.OpenAPITools/Model/Env.cs b/samples/client/petstore/csharp-restsharp-name-parameter-mappings/src/Org.OpenAPITools/Model/Env.cs
index f540de64f58f..4d30dcc37ec3 100644
--- a/samples/client/petstore/csharp-restsharp-name-parameter-mappings/src/Org.OpenAPITools/Model/Env.cs
+++ b/samples/client/petstore/csharp-restsharp-name-parameter-mappings/src/Org.OpenAPITools/Model/Env.cs
@@ -28,7 +28,7 @@ namespace Org.OpenAPITools.Model
///
/// Env
///
- [DataContract(Name = "Environment")]
+ [DataContract(Name = "varEnvironment")]
public partial class Env : IEquatable, IValidatableObject
{
///
diff --git a/samples/client/petstore/csharp-restsharp-name-parameter-mappings/src/Org.OpenAPITools/Org.OpenAPITools.csproj b/samples/client/petstore/csharp-restsharp-name-parameter-mappings/src/Org.OpenAPITools/Org.OpenAPITools.csproj
index 89948381e2ee..addc6411ef6b 100644
--- a/samples/client/petstore/csharp-restsharp-name-parameter-mappings/src/Org.OpenAPITools/Org.OpenAPITools.csproj
+++ b/samples/client/petstore/csharp-restsharp-name-parameter-mappings/src/Org.OpenAPITools/Org.OpenAPITools.csproj
@@ -24,7 +24,7 @@
-
+
diff --git a/samples/client/petstore/csharp/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Org.OpenAPITools.csproj b/samples/client/petstore/csharp/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Org.OpenAPITools.csproj
index 8662fc819fc7..6064f45f6dd4 100644
--- a/samples/client/petstore/csharp/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Org.OpenAPITools.csproj
+++ b/samples/client/petstore/csharp/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Org.OpenAPITools.csproj
@@ -24,7 +24,7 @@
-
+
diff --git a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration.Test/UseSourceGeneration.Test.csproj b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration.Test/UseSourceGeneration.Test.csproj
index 517dacd06ac6..4711912c0ea2 100644
--- a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration.Test/UseSourceGeneration.Test.csproj
+++ b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration.Test/UseSourceGeneration.Test.csproj
@@ -10,8 +10,8 @@
-
-
+
+
diff --git a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj
index c67430ffde40..87c2b274318b 100644
--- a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj
+++ b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj
@@ -10,8 +10,8 @@
-
-
+
+
diff --git a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj
index e93687711f15..086c8a39d348 100644
--- a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj
+++ b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj
@@ -9,8 +9,8 @@
-
-
+
+
diff --git a/samples/client/petstore/csharp/OpenAPIClient-generichost-netcore-latest-allOf/src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj b/samples/client/petstore/csharp/OpenAPIClient-generichost-netcore-latest-allOf/src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj
index c67430ffde40..87c2b274318b 100644
--- a/samples/client/petstore/csharp/OpenAPIClient-generichost-netcore-latest-allOf/src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj
+++ b/samples/client/petstore/csharp/OpenAPIClient-generichost-netcore-latest-allOf/src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj
@@ -10,8 +10,8 @@
-
-
+
+
diff --git a/samples/client/petstore/csharp/OpenAPIClient-generichost-netcore-latest-anyOf/src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj b/samples/client/petstore/csharp/OpenAPIClient-generichost-netcore-latest-anyOf/src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj
index c67430ffde40..87c2b274318b 100644
--- a/samples/client/petstore/csharp/OpenAPIClient-generichost-netcore-latest-anyOf/src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj
+++ b/samples/client/petstore/csharp/OpenAPIClient-generichost-netcore-latest-anyOf/src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj
@@ -10,8 +10,8 @@
-
-
+
+
diff --git a/samples/client/petstore/csharp/OpenAPIClient-generichost-netcore-latest-oneOf/src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj b/samples/client/petstore/csharp/OpenAPIClient-generichost-netcore-latest-oneOf/src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj
index c67430ffde40..87c2b274318b 100644
--- a/samples/client/petstore/csharp/OpenAPIClient-generichost-netcore-latest-oneOf/src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj
+++ b/samples/client/petstore/csharp/OpenAPIClient-generichost-netcore-latest-oneOf/src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj
@@ -10,8 +10,8 @@
-
-
+
+
diff --git a/samples/client/petstore/csharp/OpenAPIClient-httpclient/src/Org.OpenAPITools/Org.OpenAPITools.csproj b/samples/client/petstore/csharp/OpenAPIClient-httpclient/src/Org.OpenAPITools/Org.OpenAPITools.csproj
index 5ea66219d6ad..32a0e7090ce3 100644
--- a/samples/client/petstore/csharp/OpenAPIClient-httpclient/src/Org.OpenAPITools/Org.OpenAPITools.csproj
+++ b/samples/client/petstore/csharp/OpenAPIClient-httpclient/src/Org.OpenAPITools/Org.OpenAPITools.csproj
@@ -23,7 +23,7 @@
-
+
diff --git a/samples/client/petstore/csharp/OpenAPIClient-net47/src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj b/samples/client/petstore/csharp/OpenAPIClient-net47/src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj
index 31e3ea504be7..4894e3983d79 100644
--- a/samples/client/petstore/csharp/OpenAPIClient-net47/src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj
+++ b/samples/client/petstore/csharp/OpenAPIClient-net47/src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj
@@ -9,8 +9,8 @@
-
-
+
+
diff --git a/samples/client/petstore/csharp/OpenAPIClient-net47/src/Org.OpenAPITools/Org.OpenAPITools.csproj b/samples/client/petstore/csharp/OpenAPIClient-net47/src/Org.OpenAPITools/Org.OpenAPITools.csproj
index d4d61398d362..673473e74a28 100644
--- a/samples/client/petstore/csharp/OpenAPIClient-net47/src/Org.OpenAPITools/Org.OpenAPITools.csproj
+++ b/samples/client/petstore/csharp/OpenAPIClient-net47/src/Org.OpenAPITools/Org.OpenAPITools.csproj
@@ -24,7 +24,7 @@
-
+
diff --git a/samples/client/petstore/csharp/OpenAPIClient-net48/src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj b/samples/client/petstore/csharp/OpenAPIClient-net48/src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj
index 2b6c522b3b61..6e1e97fd27d1 100644
--- a/samples/client/petstore/csharp/OpenAPIClient-net48/src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj
+++ b/samples/client/petstore/csharp/OpenAPIClient-net48/src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj
@@ -9,8 +9,8 @@
-
-
+
+
diff --git a/samples/client/petstore/csharp/OpenAPIClient-net48/src/Org.OpenAPITools/Org.OpenAPITools.csproj b/samples/client/petstore/csharp/OpenAPIClient-net48/src/Org.OpenAPITools/Org.OpenAPITools.csproj
index babfa76b552e..84e6c8e86ea6 100644
--- a/samples/client/petstore/csharp/OpenAPIClient-net48/src/Org.OpenAPITools/Org.OpenAPITools.csproj
+++ b/samples/client/petstore/csharp/OpenAPIClient-net48/src/Org.OpenAPITools/Org.OpenAPITools.csproj
@@ -24,7 +24,7 @@
-
+
diff --git a/samples/client/petstore/csharp/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj b/samples/client/petstore/csharp/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj
index 7f2cb9257b59..fd52336309ad 100644
--- a/samples/client/petstore/csharp/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj
+++ b/samples/client/petstore/csharp/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj
@@ -10,8 +10,8 @@
-
-
+
+
diff --git a/samples/client/petstore/csharp/OpenAPIClient-net5.0/src/Org.OpenAPITools/Org.OpenAPITools.csproj b/samples/client/petstore/csharp/OpenAPIClient-net5.0/src/Org.OpenAPITools/Org.OpenAPITools.csproj
index 21a470d6f6a5..154b17942c57 100644
--- a/samples/client/petstore/csharp/OpenAPIClient-net5.0/src/Org.OpenAPITools/Org.OpenAPITools.csproj
+++ b/samples/client/petstore/csharp/OpenAPIClient-net5.0/src/Org.OpenAPITools/Org.OpenAPITools.csproj
@@ -25,7 +25,7 @@
-
+
diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Org.OpenAPITools.csproj b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Org.OpenAPITools.csproj
index 8662fc819fc7..6064f45f6dd4 100644
--- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Org.OpenAPITools.csproj
+++ b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Org.OpenAPITools.csproj
@@ -24,7 +24,7 @@
-
+
diff --git a/samples/client/petstore/csharp/OpenAPIClientCore/src/Org.OpenAPITools/Org.OpenAPITools.csproj b/samples/client/petstore/csharp/OpenAPIClientCore/src/Org.OpenAPITools/Org.OpenAPITools.csproj
index 21a470d6f6a5..154b17942c57 100644
--- a/samples/client/petstore/csharp/OpenAPIClientCore/src/Org.OpenAPITools/Org.OpenAPITools.csproj
+++ b/samples/client/petstore/csharp/OpenAPIClientCore/src/Org.OpenAPITools/Org.OpenAPITools.csproj
@@ -25,7 +25,7 @@
-
+
diff --git a/samples/client/petstore/csharp/OpenAPIClientCoreAndNet47/src/Org.OpenAPITools/Org.OpenAPITools.csproj b/samples/client/petstore/csharp/OpenAPIClientCoreAndNet47/src/Org.OpenAPITools/Org.OpenAPITools.csproj
index 9e32dbb6e794..2acb240dfdee 100644
--- a/samples/client/petstore/csharp/OpenAPIClientCoreAndNet47/src/Org.OpenAPITools/Org.OpenAPITools.csproj
+++ b/samples/client/petstore/csharp/OpenAPIClientCoreAndNet47/src/Org.OpenAPITools/Org.OpenAPITools.csproj
@@ -24,7 +24,7 @@
-
+