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

后端 未结 3 1985
半阙折子戏
半阙折子戏 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: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.

提交回复
热议问题