> This page is for SDKs, version Current (default).
> For other versions, use one of these documentation indexes:
> - Current (default): https://buildwithfern.com/learn/sdks/current/llms.txt
> - Legacy: https://buildwithfern.com/learn/sdks/legacy/llms.txt

> For clean Markdown content of this page, append .md to this URL. For the complete documentation index, see https://buildwithfern.com/learn/llms.txt.

# .NET configuration

> Configuration options for the C#/.NET target in sdk-config.yml.

Configure the C#/.NET SDK in the `generation` block of its target in `sdk-config.yml`:

**`sdk-config.yml`**

```yaml {3-8} title="sdk-config.yml"
targets:
  - language: csharp
    generation:
      naming:
        clientName: YourClientName
      useOptionalWrapper: true
      simplifyObjectDictionaries: true
      explicitNamespaces: true
```

The target's `generation` block also accepts the [shared generation options](/learn/sdks/reference/sdk-config#generation), such as `naming`, `wireTests`, and `customCode`. Shared options set in the top-level `generation` block apply to every target, and a target's `generation` block overrides them. For `generators.yml` options, see the [Legacy C#/.NET configuration](/learn/sdks/legacy/generators/csharp/configuration).

## C#/.NET options

**`useOptionalWrapper`** `boolean`

Whether optional values use an explicit Optional wrapper.

---

**`simplifyObjectDictionaries`** `boolean`

Whether object schemas with arbitrary values use simplified dictionary types.

---

**`explicitNamespaces`** `boolean`

Whether generated resource groups use explicit nested namespaces.

---

**`rootNamespaceForCoreClasses`** `boolean`

Whether shared client classes are emitted in the root namespace.

---

**`includeExceptionHandler`** `boolean`

Whether generated client operations use a configurable exception handler.

---

**`experimentalExplicitNullableOptional`** `boolean`

Whether optional nullable properties distinguish omitted values from explicit nulls.

---