2

I am consistently getting this error when doing a DNU publish

The process cannot access the file 'C:...\bin\output\approot\packages\AutoMapper\3.3.1\AutoMapper.3.3.1.nupkg' because it is being used by another process

With nuget.exe you could use the command line options -DisableParallelProcessing to prevent things like this from happening but I can't find an equivalent in DNU. Is there a way to prevent this?

Maxime Rouiller
  • 13,614
  • 9
  • 57
  • 107
brushwood
  • 115
  • 3
  • 9
  • Do you have Visual Studio opened? What's the command you are running when you are getting this error? – Maxime Rouiller Mar 08 '16 at 17:42
  • This is when running "dnu publish" from the command line. – brushwood Mar 08 '16 at 17:51
  • Did you ever resolve this? I'm bumping into the same error. App_offline.htm is now supported in .net core, but even with app_offline in place, and even with my website returning a 503 error, I'm _still_ unable to replace mywebsite.exe because it's in use. :( – J. Allen Dec 21 '16 at 17:56
  • I didn't really come up with a solution, just a workaround for our build process. One the build server, I check $lastexitcode to see if there was an error during the dnu publish and trying again if there was. Sometimes it will take 3 or 4 attempts before once succeeds. It's not great but it works. – brushwood Dec 23 '16 at 00:41

0 Answers0