[Solved] Run Visual Studio Debug. The process cannot access the file, because it is being used by another process

When I run my solution for the second time, this error appears:

Error 467 Unable to copy file “objx86Debuguil.dll” to “binx86Debuguil.dll”. The process cannot access the file ‘binx86Debuguil.dll’ because it is being used by another process.

For work I need to close and reopen the solution.

Solution #1:

Are you sure you are stoping running instances of your application? You need to stop the application you are developing (debugging or release mode) to start debugging.

Respondent: Mert Akcakaya
Solution #2:
  1. Check to make sure your application still running in Task manager, if yes, kill it.
  2. Disable ‘Visual Studio Hosting process’ from project properties.
Respondent: Cinchoo
Solution #3:

I’ve found a bug in VS2010, regarding solutions that reference multiple projects in which you have at least one WPF control library.
When you open the WPF designer, the DLL’s referenced by the project are locked. Therefore, trying to compile will issue that error.

If this is the scenario you are suffering, there’s no solution AFAIK, but as workaround:
1. Make sure to close ALL the WPF open designers
2. Make a rebuild all, then clean solution, then build again. This works most of the time

Or, open the XAML files in XML editor in VS2010, so the designer is not loaded. I usually write XAML directly. If you have to write a more complex XAML, then open Blend side-by-side with VS2010, so you edit XAML in Blend and compile and debug in VS2010.

Respondent: Haplo
The answers/resolutions are collected from stackoverflow, are licensed under cc by-sa 2.5 , cc by-sa 3.0 and cc by-sa 4.0 .

Most Popular

To Top
India and Pakistan’s steroid-soaked rhetoric over Kashmir will come back to haunt them both clenbuterol australia bossier man pleads guilty for leadership role in anabolic steriod distribution conspiracy