Publish your C# SDK with NuGet

To make your C#/.NET SDK publicly accessible, publish to NuGet. Once you’ve followed the steps below to connect your NuGet account to your SDK, Fern will automatically publish the latest version of your SDK.

Creating a NuGet API key

1

Log In

Log into NuGet.

3

Generate API Key

  • Click on Create.
  • Name your key.
  • Select Push > Push new packages and package versions as the Select Scopes type.
  • Enter * under Select Packages > Glob Patten.
    Replacing an existing NuGet package

    If you are overriding an existing package, you can select the relevant package instead of entering *.

  • Click Create.
Save your API key

Be sure to save the generated key - it won’t be displayed after you leave the page.

Adding API keys to your GitHub repository

Using GitLab? Follow these steps.

1

Open Repository

Open your Fern repository in GitHub.

3

Add Secret

Select New repository secret. Name your secret (we recommend NUGET_API_KEY), add the corresponding API key, and click Add secret.

Once you regenerate your SDK, a GitHub action will run to publish directly to NuGet!