none
VS RC 2012 NuGet Upgrade Fails with "The process cannot access the file because it is being used by another process."

    Question

  • Visual Studio Ultimate RC 2012

    Can't upgrade or uninstall NuGet because it fails with a file access error.  I have the same problem with VS 2010 and I fix it by deleting the NuGet extension directory.  In RC 2012, it's not obfvious to me which NuGet directories I need to delete -- there are several.

    I've also  tried turnning off McAfee.

    6/17/2012 7:29:06 AM - Microsoft VSIX Installer
    6/17/2012 7:29:06 AM - -------------------------------------------
    6/17/2012 7:29:06 AM - Initializing Install...
    6/17/2012 7:29:07 AM - Extension Details...
    6/17/2012 7:29:07 AM -     Identifier      : NuPackToolsVsix.Microsoft.67e54e40-0ae3-42c5-a949-fddf5739e7a5
    6/17/2012 7:29:07 AM -     Name            : NuGet Package Manager
    6/17/2012 7:29:07 AM -     Author          : Microsoft Corporation
    6/17/2012 7:29:07 AM -     Version         : 1.8.30524.9000
    6/17/2012 7:29:07 AM -     Description     : A collection of tools to automate the process of downloading, installing, upgrading, configuring, and removing packages from a VS Project.
    6/17/2012 7:29:07 AM -     Locale          : en-US
    6/17/2012 7:29:07 AM -     MoreInfoURL     : http://docs.nuget.org/
    6/17/2012 7:29:07 AM -     InstalledByMSI  : False
    6/17/2012 7:29:07 AM -     SupportedFrameworkVersionRange : [4.0]
    6/17/2012 7:29:07 AM -
    6/17/2012 7:29:07 AM -     SignedBy        : Microsoft Corporation
    6/17/2012 7:29:07 AM -     Certificate Info : [Subject]
      CN=Microsoft Corporation, OU=MOPR, OU=OPC, O=Microsoft Corporation, L=Redmond, S=Washington, C=US

    [Issuer]
      CN=Microsoft Code Signing PCA, O=Microsoft Corporation, L=Redmond, S=Washington, C=US

    [Serial Number]
      6115FE48000100000072

    [Not Before]
      3/26/2012 2:19:05 PM

    [Not After]
      6/26/2013 2:19:05 PM

    [Thumbprint]
      81D284D9445B97F949262CF8535FED68A63CE4C1

    6/17/2012 7:29:07 AM -     Supported Products :
    6/17/2012 7:29:07 AM -         Microsoft.VisualStudio.Pro
    6/17/2012 7:29:07 AM -             Version : [10.0]
    6/17/2012 7:29:07 AM -         Microsoft.VisualStudio.Pro
    6/17/2012 7:29:07 AM -             Version : [11.0]
    6/17/2012 7:29:07 AM -         Microsoft.VisualStudio.IntegratedShell
    6/17/2012 7:29:07 AM -             Version : [10.0]
    6/17/2012 7:29:07 AM -         Microsoft.VisualStudio.IntegratedShell
    6/17/2012 7:29:07 AM -             Version : [11.0]
    6/17/2012 7:29:07 AM -         Microsoft.VisualStudio.VWDExpress
    6/17/2012 7:29:07 AM -             Version : [10.0]
    6/17/2012 7:29:07 AM -         Microsoft.VisualStudio.VWDExpress
    6/17/2012 7:29:07 AM -             Version : [11.0]
    6/17/2012 7:29:07 AM -         Microsoft.VisualStudio.VPDExpress
    6/17/2012 7:29:07 AM -             Version : [10.0]
    6/17/2012 7:29:07 AM -         Microsoft.VisualStudio.VPDExpress
    6/17/2012 7:29:07 AM -             Version : [11.0]
    6/17/2012 7:29:07 AM -         Microsoft.VisualStudio.VSWinExpress
    6/17/2012 7:29:07 AM -             Version : [11.0]
    6/17/2012 7:29:07 AM -
    6/17/2012 7:29:07 AM -     References      :
    6/17/2012 7:29:07 AM -
    6/17/2012 7:29:10 AM - The extension will be upgraded from version 1.8.30423.9026.
    6/17/2012 7:29:12 AM - The following target products have been selected...
    6/17/2012 7:29:12 AM -     Microsoft Visual Studio Ultimate 2012 RC
    6/17/2012 7:29:12 AM -
    6/17/2012 7:29:12 AM - Beginning to install extension to Microsoft Visual Studio Ultimate 2012 RC...
    6/17/2012 7:29:12 AM - Upgrading 'NuGet Package Manager', version 1.8.30423.9026 to version 1.8.30524.9000.
    6/17/2012 7:29:21 AM - Install Error : System.IO.IOException: The process cannot access the file because it is being used by another process.
       at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
       at System.IO.__Error.WinIOError()
       at System.IO.File.InternalMove(String sourceFileName, String destFileName, Boolean checkHost)
       at Microsoft.VisualStudio.ExtensionManager.ExtensionManagerService.AtomicallyDeleteFiles(IEnumerable`1 filePaths, Boolean justMarkForDeletion)
       at Microsoft.VisualStudio.ExtensionManager.ExtensionManagerService.DeleteDiscoverableFiles(IInstalledExtension extension)
       at Microsoft.VisualStudio.ExtensionManager.ExtensionManagerService.UninstallInternal(IInstalledExtension extension, Boolean forceDelete)
       at Microsoft.VisualStudio.ExtensionManager.ExtensionManagerService.CommitInstalledAndUninstalledExtensions(IEnumerable`1 installedExtensions, IEnumerable`1 uninstalledExtensions, IEnumerable`1 packComponentChanges)
       at Microsoft.VisualStudio.ExtensionManager.ExtensionManagerService.BeginInstall(IInstallableExtension installableExtension, Boolean perMachine, AsyncOperation asyncOp)
       at Microsoft.VisualStudio.ExtensionManager.ExtensionManagerService.InstallWorker(IInstallableExtension extension, Boolean perMachine, AsyncOperation asyncOp)

    Sunday, June 17, 2012 2:39 PM

Answers

  • I resolved this by deleting subdirectories of C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\Extensions\  that contain references to NuGet.

    Then restarted VS 2012 RC and was able to install the latest NuGet.


    • Marked as answer by mikelheim Sunday, June 17, 2012 8:31 PM
    • Edited by mikelheim Sunday, June 17, 2012 8:35 PM
    Sunday, June 17, 2012 8:31 PM

All replies

  • I resolved this by deleting subdirectories of C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\Extensions\  that contain references to NuGet.

    Then restarted VS 2012 RC and was able to install the latest NuGet.


    • Marked as answer by mikelheim Sunday, June 17, 2012 8:31 PM
    • Edited by mikelheim Sunday, June 17, 2012 8:35 PM
    Sunday, June 17, 2012 8:31 PM
  • Hi mikelheim,

    I’m glad to hear that you got it working.

    Thank you for sharing your solutions & experience here.

    It will be very beneficial for other community members who have similar questions.

    Thanks,

    Ego

    Monday, June 18, 2012 5:09 AM
  • Thanks very much, it saved my time :)
    Monday, November 04, 2013 3:26 AM