Publish C# SDKs generated in Postman
Publish C# SDKs generated in Postman
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>.