Publish C# SDKs generated in Postman
SDK generation in Postman has moved. Postman SDK Generator has been consolidated into Fern, Postman’s official SDK and documentation engine, which delivers idiomatic, type-safe client libraries and automated publishing across the API lifecycle. No more updates will be made to Postman SDK Generator—all new SDK capabilities are delivered in Fern as part of the Postman platform. See the Fern SDK documentation to get started, or follow the migration guide to upgrade your existing configuration.
This guide covers publishing generated C# SDKs. For information on automating C# SDK publishing, see Publish C# SDKs automatically.
Publishing your SDK to NuGet.org makes it available to any .NET developer using dotnet add package.
Prerequisites
To publish your SDK to NuGet, you need the following:
- A NuGet.org account.
- An API key from your NuGet account settings.
Configure the project file
The generated [SdkName].csproj already includes the metadata required for publishing. Review and update the following fields before publishing.
Publish your C# SDK to NuGet
To publish your SDK to NuGet, do the following:
-
Build and pack the SDK.
-
Publish to NuGet.
-
Verify the publication at
https://www.nuget.org/packages/YourSdk. Packages are typically indexed within 15 to 30 minutes.
Publish updates
To publish updates to your SDK, run the following:
Best practices for publishing C# SDKs
Use the following best practices when publishing your C# SDK to NuGet:
- Use semantic versioning.
- Generate and include XML documentation by setting
<GenerateDocumentationFile>true</GenerateDocumentationFile>in your.csprojfile. - Tag releases in Git.
- Include a
.snupkgsymbols package for debugging support by adding<IncludeSymbols>true</IncludeSymbols>and<SymbolPackageFormat>snupkg</SymbolPackageFormat>.