Concurrent nuget install failures #7380
Labels
Functionality:Restore
Product:dotnet.exe
Product:NuGet.exe
NuGet.exe
Resolution:ByDesign
This issue appears to be ByDesign
Style:PackageReference
We are using TeamCity with multiple agents on the same physical machine. We want to have all the agents share the same global packages folder to save disk space. Even then, it is not enough and we clear the packages from time to time. The result is that we have only one shared global packages folder, but install and restore operations fail regularly after we clear the locals caches.
We get errors like these
Access to the path 'bqipdjvv.1mg' is denied.
The directory is not empty.
Unfortunately, the NuGetScratch folder is located under the
%temp%
folder which TeamCity override per agent. What we understand is that the scratch folder is used to lock the downloads and installs of packages in the global cache. If we try to install the same package for the first time from differentnuget install
at the same time, the second will wait for the first one to finish without problem.However, if I repeat the experiment with different
%temp%
at least one of thenuget install
will fail.Is there any reason that the NuGetScratch folder is located in
%temp%
while other NuGet folders are in%localappdata%
or the user folder?Do you think there is a way to make this work anyway? I mean using nuget from different TeamCity agents sharing the same global packages folder but not the same
%temp%
folder?The text was updated successfully, but these errors were encountered: