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

后端 未结 3 1957
半阙折子戏
半阙折子戏 2021-01-24 23:53

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

Error 467 Unable to copy file \"obj\\x86\\Debug\\uil.dll\" to \"bin\\x86\\Debug\\uil.dll\". The process

相关标签:
3条回答
  • 2021-01-25 00:36

    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.

    0 讨论(0)
  • 2021-01-25 00:56
    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.
    0 讨论(0)
  • 2021-01-25 00:57

    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.

    0 讨论(0)
提交回复
热议问题