Skip to content

Split NuGet mega-packages to stay under 500MB feed limit#3584

Merged
mattleibow merged 3 commits into
mainfrom
dev/split-nuget-mega-packages
Mar 28, 2026
Merged

Split NuGet mega-packages to stay under 500MB feed limit#3584
mattleibow merged 3 commits into
mainfrom
dev/split-nuget-mega-packages

Conversation

@mattleibow

Copy link
Copy Markdown
Contributor

Problem

The _NuGets and _NuGetsPreview CI artifact packages exceed the Azure DevOps NuGet feed size limit of 500MB, causing push failures.

Solution

Split each mega-package into two sub-packages:

  • .Managed — managed-only nupkgs (SkiaSharp.dll, Views, HarfBuzz, etc.)
  • .NativeAssets — native asset nupkgs (Win32, Linux, macOS, Android, iOS, etc.)

The parent becomes a meta-package with NuGet dependencies on both sub-packages. DownloadPackageAsync already follows dependencies, so consumers are unaffected.

Packages affected

Package Change
_NuGets Meta → .Managed + .NativeAssets
_NuGetsPreview Meta → .Managed + .NativeAssets
_Symbols Meta → .Managed + .NativeAssets
_SymbolsPreview Meta → .Managed + .NativeAssets

The _NuGets, _NuGetsPreview, _Symbols, and _SymbolsPreview packages
exceeded the Azure DevOps 500MB size limit. Split each into:
  - .Managed (managed-only nupkgs, small)
  - .NativeAssets (native asset nupkgs, large)
  - Parent meta-package (depends on both sub-packages)

The download side (DownloadPackageAsync) already follows dependencies,
so consumers automatically get both sub-packages when requesting the
parent.

New nuspec templates:
  _NuGets.Managed.nuspec, _NuGets.NativeAssets.nuspec
  _NuGetsPreview.Managed.nuspec, _NuGetsPreview.NativeAssets.nuspec
  _Symbols.Managed.nuspec, _Symbols.NativeAssets.nuspec
  _SymbolsPreview.Managed.nuspec, _SymbolsPreview.NativeAssets.nuspec

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
mattleibow and others added 2 commits March 28, 2026 00:45
Instead of manually splitting _NuGets into .Managed and .NativeAssets
sub-packages, dynamically bin-pack all nupkgs into ~200 MB numbered
chunks (_NuGets.Dependencies.1, .2, .3, etc.). The parent meta-package
depends on all chunks.

This is self-balancing: as packages grow or shrink, the chunk count
adjusts automatically without any manual curation.

- Delete 8 .Managed/.NativeAssets nuspec files
- Add generic _Dependencies.nuspec template for chunks
- Rewrite nuget-special Cake target with first-fit decreasing bin-packing
- _NativeAssets handling (raw native binaries) is unchanged

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@mattleibow mattleibow merged commit a8915ee into main Mar 28, 2026
1 of 2 checks passed
@mattleibow mattleibow deleted the dev/split-nuget-mega-packages branch March 28, 2026 00:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant