NuGet.exe locked - being used by another process

ferdt's Avatar

ferdt

05 Sep, 2012 08:44 AM

Hi,
I got the following error while uploading my source:

 error : The process cannot access the file 'C:\Users\apphbbdf0db569d9446\AppData\Local\NuGet\NuGet.exe' because it is being used by another process.
...
error MSB3073: The command ""D:\temp\ctj11ibs.k5f\input\.nuget\nuget.exe" install "D:\temp\ctj11ibs.k5f\input\HachikoWeb\packages.config" -source "" -o "D:\temp\ctj11ibs.k5f\input\packages"" exited with code 1.

I was looking for help in the knowledge base but only found suggestion to upgrade my NuGet package manager but it's already in the latest version.

Can I get any assistance please.
Thanks a lot.

  1. Support Staff 2 Posted by tt on 05 Sep, 2012 03:37 PM

    tt's Avatar

    Are you sure the NuGet.exe in the repository is also the latest version?

  2. tt closed this discussion on 05 Sep, 2012 03:37 PM.

  3. ferdt re-opened this discussion on 09 Sep, 2012 09:48 AM

  4. 3 Posted by ferdt on 09 Sep, 2012 09:48 AM

    ferdt's Avatar

    Well,
    I used this error as an opportunity to upgrade our solution to VS2012 and .NET 4.5.
    All is new now, including Nuget Package Manager and all nuget packages.
    But right now i'm getting this weird inconsistent behavior - When i'm getting this nuget "file is used by another process" error, I'm just committing the app again (by "Test Hook") in github and it works...

    attached an image of 3 uploads of the same commit - the first 2 failed and the 3rd worked...
    so right now i'm just committing over and over again until it works sometime..

  5. Support Staff 4 Posted by tt on 10 Sep, 2012 02:42 PM

    tt's Avatar

    Inside your repository, there's a NuGet.exe located in a .nuget directory. This isn't updated automatically as far as I know, so you'll need to make sure this is the latest version as well. We use "/m" as a switch to MSBuild to utilize multiple cores and this fails with older versions of NuGet. The reason some builds succeed is likely that we're processing another build at the same time causing MSBuild to only use a single core.

  6. tt closed this discussion on 10 Sep, 2012 02:42 PM.

  7. ferdt re-opened this discussion on 12 Sep, 2012 10:14 AM

  8. 5 Posted by ferdt on 12 Sep, 2012 10:14 AM

    ferdt's Avatar

    well, I've double and triple checked, and the NuGet.exe file is the most recent.
    (image attached) and i'm still suffering from locked file error

  9. Support Staff 6 Posted by tt on 12 Sep, 2012 12:43 PM

    tt's Avatar

    Could you add [email blocked] as collaborator?

  10. tt closed this discussion on 12 Sep, 2012 12:43 PM.

  11. ferdt re-opened this discussion on 12 Sep, 2012 12:45 PM

  12. 7 Posted by ferdt on 12 Sep, 2012 12:45 PM

    ferdt's Avatar

    you got it

  13. Support Staff 8 Posted by friism on 13 Sep, 2012 03:45 AM

    friism's Avatar

    This is definitely interesting. Could we get you to try and remove the NuGet package restore related functionality (details here) and re-add NuGet package restore. This is to make sure that your nuget targets file is pointing at the correct executable.

    Michael

  14. 9 Posted by ferdt on 14 Sep, 2012 02:43 PM

    ferdt's Avatar

    seems like it worked.
    thanks a lot!

  15. tt closed this discussion on 14 Sep, 2012 03:13 PM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac