Learn how to create, version, and publish .NET packages to DepAegis using the dotnet CLI and MSBuild properties.
Before publishing, make sure you have:
DepAegis source configured. See Configuring NuGet.Use dotnet pack to compile your project and produce a .nupkg file:
dotnet pack --configuration ReleaseThe resulting .nupkg file is placed in the bin/Release/ output directory. You can specify an output directory with --output:
dotnet pack --configuration Release --output ./artifactsFor a more detailed package with metadata, ensure your .csproj includes the relevant properties (see MSBuild Properties for Packaging below).
Push the package to DepAegis using the dotnet nuget push command:
dotnet nuget push ./artifacts/MyCompany.Utils.1.0.0.nupkg \
--source "DepAegis" \
--api-key "your-api-key"If you have already set the API key with dotnet nuget setapikey, you can omit the --api-key flag:
dotnet nuget push ./artifacts/MyCompany.Utils.1.0.0.nupkg --source "DepAegis"Symbol packages (debugging information for consumers) are not supported yet. A .snupkg cannot be pushed to DepAegis at this time — building with -p:IncludeSymbols=true works fine (the .snupkg just sits in your artifacts folder); push the .nupkg alone.
DepAegis follows standard NuGet versioning rules based on Semantic Versioning (SemVer):
| Version Format | Example | When to Use |
|---|---|---|
Major.Minor.Patch | 1.0.0 | Stable releases |
Major.Minor.Patch-Prerelease | 1.1.0-beta.1 | Pre-release versions |
Major.Minor.Patch-Build | 1.0.0+20260611 | Build metadata (ignored during resolution) |
Set the version via the Version property in your .csproj or pass it at the command line:
dotnet pack -p:Version=2.1.0-beta.3 --configuration ReleaseConfigure package metadata directly in your .csproj file for reproducible, self-documenting builds:
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<PackageId>MyCompany.Utils</PackageId>
<Version>1.0.0</Version>
<Authors>Engineering Team</Authors>
<Company>MyCompany</Company>
<Description>Internal utility library for MyCompany services.</Description>
<PackageTags>internal;utilities;mycompany</PackageTags>
<RepositoryUrl>https://github.com/mycompany/utils</RepositoryUrl>
<RepositoryType>git</RepositoryType>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<PackageReadmeFile>README.md</PackageReadmeFile>
</PropertyGroup>
<ItemGroup>
<None Include="README.md" Pack="true" PackagePath="" />
</ItemGroup>
</Project>PackageReadmeFile to embed a README in your package. It will be displayed on the DepAegis package detail page.For automated publishing from CI pipelines, store your DepAegis API key as a secure secret and pass it via environment variable or pipeline parameter:
# GitHub Actions example
- name: Publish to DepAegis
run: |
dotnet pack --configuration Release -p:Version=${{ env.PACKAGE_VERSION }}
dotnet nuget push ./artifacts/*.nupkg \
--source "DepAegis" \
--api-key "${{ secrets.DEPAEGIS_API_KEY }}"
env:
PACKAGE_VERSION: "1.2.0"For detailed guides, see GitHub Actions, GitLab CI, and Azure DevOps.
DepAegis supports unlisting package versions, which hides them from search results and the package listing while keeping them available for existing consumers who reference the version directly.
To unlist a package version, navigate to the package page in the DepAegis dashboard and use the Unlist action. Organization administrators can also permanently delete versions, but this is not recommended as it breaks downstream builds that depend on the exact version.
dotnet restore failures for any project referencing that version. Prefer unlisting over deletion.