Marketplace Publishing DOTNET
Publish .NET packages to NuGet and Visual Studio Marketplace
Marketplace Publishing DOTNET is a development skill for publishing .NET packages to NuGet and Visual Studio Marketplace, covering package creation, versioning, authentication, and automated distribution workflows
What Is This?
Overview
Marketplace Publishing DOTNET streamlines the process of distributing .NET libraries and tools to NuGet and Visual Studio Marketplace. This skill handles package metadata configuration, version management, API key authentication, and publishing pipelines. It eliminates manual steps and reduces errors when releasing production packages to public registries.
The skill integrates with CI/CD systems to automate publishing workflows. It supports both command-line publishing and programmatic approaches, making it suitable for individual developers and enterprise teams managing multiple package releases. By leveraging this skill, teams can ensure that their packages are published consistently, with all required metadata, dependencies, and versioning in place. It also supports integration with popular CI/CD platforms such as GitHub Actions, Azure Pipelines, and GitLab CI, allowing for seamless automation from code commit to package publication.
Who Should Use This
.NET developers, library maintainers, and DevOps engineers who need to publish NuGet packages or Visual Studio extensions should use this skill. Teams automating their release processes will find it particularly valuable. Open-source contributors who want to share reusable components, as well as enterprise teams distributing internal libraries, can benefit from the automation and reliability this skill provides. It is also useful for organizations that require strict compliance with release policies, as it enables traceable and auditable publishing workflows.
Why Use It?
Problems It Solves
Manual package publishing is error-prone and time-consuming. Developers often struggle with authentication, version conflicts, and inconsistent metadata across releases. This skill automates the entire publishing pipeline, ensuring consistent package quality and reducing deployment friction. It helps avoid common pitfalls such as forgetting to update version numbers, misconfiguring package metadata, or accidentally publishing incomplete builds. By automating these steps, the skill reduces the risk of human error and ensures that every release meets quality standards.
Core Highlights
Publishing to NuGet requires only a few configuration steps and API credentials. The skill handles semantic versioning automatically, preventing version conflicts and duplicate uploads. Authentication is managed securely through environment variables and credential stores. Integration with CI/CD pipelines enables one-command releases directly from version control. The skill also supports pre-release versioning, allowing teams to publish beta or preview packages for testing before a full release. It can generate release notes from commit messages or changelogs, further enhancing the professionalism of published packages.
How to Use It?
Basic Usage
dotnet pack --configuration Release
dotnet nuget push bin/Release/*.nupkg \
--api-key $NUGET_API_KEY \
--source https://api.nuget.org/v3/index.jsonThis basic workflow creates a NuGet package from your project and publishes it to NuGet.org using your API key. The process can be scripted or integrated into CI/CD pipelines for repeatable, automated releases.
Real-World Examples
Publishing a library with automatic versioning from git tags:
$version = git describe --tags --always
dotnet pack /p:Version=$version \
--configuration Release
dotnet nuget push bin/Release/*.nupkg \
--api-key $NUGET_API_KEYThis approach ensures that each package version matches your repository’s tags, simplifying traceability and rollback.
Publishing a Visual Studio extension with metadata:
dotnet publish --configuration Release
vsixpublisher.exe publish \
--payload "bin/Release/extension.vsix" \
--publishManifest manifest.json \
--personalAccessToken $VS_TOKENHere, the VSIX Publisher tool is used to upload a Visual Studio extension, with metadata specified in a manifest file and authentication handled via a personal access token.
Advanced Tips
Use semantic versioning with git tags to automatically increment versions across releases, ensuring consistency without manual version editing. Configure separate API keys for development and production environments to prevent accidental releases to the wrong registry. Consider using package signing to add authenticity and integrity to your packages. For large teams, set up branch protection and required status checks in your repository to ensure only validated builds are published.
When to Use It?
Use Cases
Publishing open-source libraries to NuGet for community consumption requires reliable, repeatable publishing workflows. Commercial software vendors need automated publishing to Visual Studio Marketplace with proper authentication and audit trails. Internal teams distributing shared libraries across projects benefit from centralized package management. Continuous deployment pipelines require automated publishing triggered by version tags or release branches. This skill is also valuable when maintaining multiple packages that must be released together, as it supports batch publishing and dependency management.
Related Topics
This skill complements package versioning strategies, CI/CD pipeline configuration, and NuGet package management best practices. It is closely related to topics such as automated testing, release management, and secure credential handling.
Important Notes
While Marketplace Publishing DOTNET streamlines .NET package publishing, certain prerequisites and best practices must be followed for secure, consistent releases. Understanding the requirements, recommendations, and limitations helps ensure smooth integration with CI/CD pipelines and avoids common pitfalls such as authentication errors, version mismatches, or incomplete metadata.
Requirements
- .NET SDK installed on the build or publishing environment (version compatible with your project)
- Access to a NuGet.org account with an API key for publishing
- For Visual Studio Marketplace, a Microsoft account and a valid personal access token (PAT)
- Appropriate permissions to push packages to the target registry or marketplace
Usage Recommendations
- Store API keys and tokens securely using environment variables or secret managers in your CI/CD system
- Automate versioning using git tags or CI/CD variables to prevent manual errors
- Validate package metadata and dependencies before publishing to avoid incomplete or broken releases
- Use separate credentials for development and production environments to minimize risk
- Regularly audit published packages and access logs for compliance and security
Limitations
- Does not handle package testing or validation beyond publishing; integrate separate testing steps into your pipeline
- Limited to .NET packages and Visual Studio extensions; does not support other language ecosystems
- Requires manual setup of credentials and environment configuration in CI/CD systems
- Batch publishing of interdependent packages may require additional scripting or orchestration
More Skills You Might Like
Explore similar skills to enhance your workflow
Proto Persona
Create a proto-persona from current research, market signals, and team knowledge. Use when you need a working customer profile before deeper
Firecrawl Download
Downloads full websites as local markdown files, screenshots, or multiple formats
Python Configuration Management
- Migrating from hardcoded values to environment variables
Analyzing MFT for Deleted File Recovery
Analyze the NTFS Master File Table ($MFT) to recover metadata and content of deleted files by examining MFT record
TypeScript MCP Server Generator
typescript-mcp-server-generator skill for programming & development
C# Docs
Streamline programming and development documentation with the C# Docs skill