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

## 2.60.0

**`(feat):`** 添加可选的 `enable-inline-types` 配置选项。启用时，在 API 定义中标记为内联的类型在父类型上作为静态 `Types` 类内的嵌套类生成，而不是作为单独的顶级文件。

例如，给定一个具有内联 `Address` 属性的 `User` 类型，生成的 C# 如下所示：

```csharp
public record User
{
    public required Types.Address Address { get; set; }

    public static class Types
    {
        public record Address
        {
            public required string Street { get; set; }
            public required string City { get; set; }
        }
    }
}
```

支持所有类型形状：对象、枚举、区分联合和未区分联合。递归嵌套有效（例如 `User.Types.Address.Types.Coordinate`），如果父类型已经有 `Types` 属性，冲突避免会将嵌套类重命名为 `InnerTypes`。

```yaml
generators:
  - name: fernapi/fern-csharp-sdk
    config:
      enable-inline-types: true
```

## 2.31.1

**`(fix):`** 修复当客户端类名与命名空间根段匹配时的 CS0426 编译错误（例如，命名空间 `Candid.Net` 中的类 `Candid`）。C# 编译器之前将 `Candid.Net` 解析为在 `Candid` 类型上查找 `Net` 成员，而不是 `Candid.Net` 命名空间。生成器现在在内联引用和 `using` 指令中使用 `global::` 前缀来消除歧义。