NuGet Pack and NuGet Publish build step creates file in use error?
I have 2 build steps in the following order "NuGet Pack", then "NuGet Publish". In the publish builds step I get:
"The process cannot access the file 'somelibpackage.1.0.0.nupkg' because it is being used by another process."
Has anyone come across this happening? And if so how did you resolve it?
Please sign in to leave a comment.
Turns out this is possibly a NuGet issue and nothing to do with TeamCity. https://github.com/NuGet/Home/issues/7020
Hi Kevin,
I am unaware of such an issue specific to teamcity. If under some circumstances the nuget process isn't finishing cleanly and it's a known issue with nuget, bringing more detail to their issue might help.
I'll forward it to the responsible developer on our side, to make sure he is aware of the existence of this issue, thanks for bringing it to our attention.
A quick follow up. Make sure that the file is not being blocked by the antivirus. With the file being recently created, it's not impossible that the antivirus is checking the recently created file and failing in the next step.