Base solution for your next web application
Open Closed

Self-Hosting NuGet Packages #12586


User avatar
0
NPECAdmin created

Since AspNet Zero 15 moved the NuGet packages behind a private feed, does anyone have example pipeline scripts for publishing them to a self-hosted NuGet server? We’d like to host the packages ourselves so we can manage authentication and make our build pipelines more reliable.

If you’ve already set this up or have any tips, I’d really appreciate the help. Thanks!

Markdown is supported
Copy & paste or drag & drop images (max 30 MB per image)

2 Answer(s)
  • User Avatar
    0
    NPECAdmin created

    Hi, can you please help me with this

    Markdown is supported
    Copy & paste or drag & drop images (max 30 MB per image)
  • User Avatar
    0
    oguzhanagir created
    Support Team

    Hi @NPECAdmin

    AspNet Zero v15 moved its NuGet packages behind a private feed intentionally, and currently self hosting or redistributing AspNet Zero NuGet packages is not officially supported.

    That said, technically it is possible to mirror the packages to your own NuGet server, but this comes with some important considerations:

    Licensing & responsibility Once you download packages from the AspNet Zero private feed and republish them internally, you become responsible for:

    • License compliance
    • Access control
    • Version management and updates AspNet Zero does not provide official guidance or support for this setup.

    Why private feed is recommended The built-in private feed already supports:

    • Token based authentication
    • High availability
    • CI/CD friendly access via nuget.config This is the recommended and supported approach for build reliability.

    Typical (unsupported) mirroring approach If you still choose to proceed, teams usually:

    • Authenticate to the AspNet Zero feed in CI
    • Download required .nupkg files using dotnet restore or nuget.exe
    • Push them to an internal NuGet server using dotnet nuget push

    Example (illustrative only):

    dotnet nuget add source https://nuget.aspnetzero.com/v3/index.json \
      --name AspNetZero \
      --username <username> \
      --password <token> \
      --store-password-in-clear-text
    
    dotnet restore
    
    dotnet nuget push *.nupkg \
      --source https://your-internal-feed/v3/index.json \
      --api-key <internal-api-key>
    

    Again, this is not an officially supported workflow.

    We strongly recommend continuing to use the official AspNet Zero private NuGet feed and configuring proper authentication in your pipelines (Azure DevOps, GitHub Actions, GitLab CI, etc.). This ensures:

    • Guaranteed compatibility
    • Timely updates
    • Full support from the AspNet Zero team

    If build reliability is the concern, we can help review your CI configuration and recommend best practices for caching and authentication with the private feed.

    Thank you

    Markdown is supported
    Copy & paste or drag & drop images (max 30 MB per image)