Search code examples
visual-studio-2010debuggingexpression-blend-4

Using Expression Blend 4 with Visual Studio2010 for debugging


I'm doing my views implementation in Blend 4 and I want to debug my code in Visual Studio 2010.

After start my project from Blend I attach the VS debugger to it. The debugging works fine. The next time I want to debug again (after some modifications) I can't build the project with error message:

Unable to copy file "obj\Debug\Application.exe" to "bin\Debug\Application.exe". The process cannot acess the file "bin\Debug\Applicaiton.exe" because it is being used by another process

The same message comes from both dev.app.

According to the Task Manager there is no running Application.exe. When I close the Visual Studio I can run the project again.

What is the solution to run and modify and debug the code without always reopening one of these dev.apps?


Solution

  • You can delete your obj/bin folders, that stuff is created when built. Personally what I do is all my view work in Blend, then I always build from VS. As long as you have all your SDK's and everything is synced etc I found this to be the best way.

    Just remember to ctrl+Shift+S often when you're flipping between Blend & VS or you'll find that the contents of one may overwrite the other by mistake.

    So for example if I do some view/design work in Blend, I religiously save it, then flip over to VS to build it. The only down side to this, is you need a decent spec machine to run both Blend & VS simultaneously without much lag. Hope this helps.