3

Installing extensions or NuGet packages to Visual Studio fail with the error 'The process cannot access the file because it is being used by another process'.

This link provides a workaround but it's a pain to have to do it each time an Extension / NuGet package needs updating when I'd just like to use the in built functionality if possible.

Does anyone know of a fix for this?

John
  • 671
  • 10
  • 18

2 Answers2

6

We found that this was an issue with our corporate McAfee anti-virus software.

This link from McAfee took us part of the way, however, we had to add three process names to the exclusion list to allow the updates to execute without error.

  1. Open RegEdit and navigate to:

    HKLM\System\CurrentControlSet\Services\mfeEEFF

  2. Create a key 'ExemptedProcesses'.

  3. Under the HKLM\System\CurrentControlSet\Services\mfeEEFF\ExemptedProcesses multiple String Values can be created.
  4. Create the following String Values (listed as Name / Type / Data):

    '1' / 'REG_SZ' / 'devenv.exe'

    '2' / 'REG_SZ' / 'MSIEXE.exe'

    '3' / 'REG_SZ' / 'VSIXInstaller.exe'

  5. Reboot the machine.

John
  • 671
  • 10
  • 18
  • Thanks for sharing your answer here, please mark it. It is benefit to other communities who has the same issue. – Weiwei Oct 14 '16 at 07:46
  • 2
    I have the same problem and also McAfee installed. But there is no "mfeEEFF" entry in my registry. Instead of this there are a lot of entries starting with "mfe..." - which one should I take? – vso Apr 27 '17 at 12:44
0

For all that have some restriction to write to this file, or only want to do a quick fix and install the Nuget, the best solution that I found is to boot into safe-mode with network(McAfee will not start on safe-mode) open solution and install the Nuget.

Yohan
  • 783
  • 6
  • 13