We use TeamCity (9.0) as our CI server to create, test, and deploy multiple applications. Recently, we have been observing random (one for every 30/40 bit) NuGet errors (2.8.3) as follows:
[restore] The process cannot access the file C: \ BuildAgent \ work \ e32cbd0940f38bf ..... \ packages \ Newtonsoft.Json.5.0.6 \ Newtonsoft.Json.5.0.6.nupkg 'because it is used by another process.
where the actual package seems to be different from time to time.
We suspected that this was due to the fact that the same package refers to several projects within the same solution, but I expect NuGet to be able to handle this correctly by filtering out duplicates instead of trying to get the same one the same package several times, thereby ending with the recording of locks when restoring packages in the working folder.
As the first step of each build configuration, we have NuGet Installer installed for recovery. I tried to mess with my settings (different "Update Modes", "-NoCache", an older version of NuGet (2.8.0)), but to no avail.
Has anyone else encountered similar problems, and if so, then there are suggestions on how to ensure that this error does not occur.
Any help would be greatly appreciated!
nuget teamcity
Jiri
source share