Server stack trace: at System.IO.MemoryStream.ToArray() at NuGet.StreamExtensions.ToStreamFactory(Stream stream) at NuGet.ZipPackageFile..ctor(PackagePart part) at NuGet.ZipPackage.<GetFilesNoCache>b__11(PackagePart part) at System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext() at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection) at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source) at NuGet.ZipPackage.GetFilesNoCache() at System.Lazy`1.CreateValue()

Exception rethrown at [0]: at System.IO.MemoryStream.ToArray() at NuGet.StreamExtensions.ToStreamFactory(Stream stream) at NuGet.ZipPackageFile..ctor(PackagePart part) at NuGet.ZipPackage.<GetFilesNoCache>b__11(PackagePart part) at System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext() at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection) at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source) at NuGet.ZipPackage.GetFilesNoCache() at System.Lazy`1.CreateValue() at System.Lazy`1.LazyInitValue() at System.Lazy`1.get_Value() at NuGet.MemoryCache.GetOrAdd[T](Object cacheKey, Func`1 factory, TimeSpan expiration, Boolean absoluteExpiration) at NuGet.ZipPackage.GetFilesBase() at NuGet.ZipPackage.GetAssembliesNoCache() at System.Lazy`1.CreateValue()

How large is the package that you are trying to deploy? Your deployment packages have been downloaded on C:\\ProgramData\\Red Gate\\DeploymentManager\\Data\\PackageCache on your Deployment Manager server. Your package should be called RESULTSETPACK.1.0.0

We rely on NuGet packages to do our deployments. The total memory use depends on how NuGet unzips a package (we unzip the package on the Agent before installing it). We have had an issue with NuGet before as it tries to load a significant chunk of the package into memory during install and of course, the decompression also expands the package size.

May I also ask, what type of package are you deploying, is it a database package with static data?

The version of Deployment Manager that contains the new version of NuGet and should address your issue has just been released.
Please make sure to upgrade the server and your agents to benefit from this fix.