It seems when multiple deployments try to access the same NuGet Package it fails with a file in use error: (I don’t recall ever seeing this in v.1x)
Download package Club_Sites 2.1.0.162 from NuGet feed: ICE Team City
23:35:32
Info
Downloading NuGet package Club_Sites 2.1.0.162 from feed: 'http://us-hq-tcs-01/guestAuth/app/nuget/v1/FeedService.svc/'
23:35:57
Error
Unable to download package: The process cannot access the file 'C:\Users\QASystem\AppData\Local\NuGet\Cache\Club_Sites.2.1.0.162.nupkg' because it is being used by another process. System.IO.IOException: The process cannot access the file 'C:\Users\QASystem\AppData\Local\NuGet\Cache\Club_Sites.2.1.0.162.nupkg' because it is being used by another process. at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath) at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy) at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options) at NuGet.PhysicalFileSystem.CreateFile(String path) at NuGet.DataServicePackage.EnsurePackage(IPackageCacheRepository cacheRepository) at NuGet.DataServicePackage.GetStream() at NuGet.FileSystemExtensions.AddFileWithCheck(IFileSystem fileSystem, String path, Func`1 streamFactory) at Octopus.Shared.Packages.PackageDownloader.AttemptToFindAndDownloadPackage(Int32 attempt, PackageMetadata packageMetadata, IFeed feed, IActivity log, String cacheDirectory, IPackage& downloadedPackage, String& path) in c:\TeamCity\buildAgent\work\1116bd9da9e239fd\source\Octopus.Shared\Packages\PackageDownloader.cs:line 136 at Octopus.Shared.Packages.PackageDownloader.AttemptToDownload(PackageMetadata metadata, IFeed feed, IActivity log) in c:\TeamCity\buildAgent\work\1116bd9da9e239fd\source\Octopus.Shared\Packages\PackageDownloader.cs:line 89
23:35:57
Fatal
The package could not be downloaded from NuGet. If you are getting a package verification error, try switching to a Windows File Share package repository to see if that helps.