I got a Windows Phone 7 application project from a friend. Now I downloaded the SdK 7.1 from here. Everything installed fine and it includes Expression Blend 4 as well as VS 2010 Express for Windows Phone.
Now the problem is that when I Run this project, I keep getting this error:
Unable to copy file "obj\Debug\MyProject.dll" to "\Bin\Debug\MyProject.dll". The process cannot access the file '\Bin\Debug\MyProject.dll" because it is being used by another process.
To make it run I have to close the Expression Blend and delete Bin and obj folders and then it will happily run.
I looked around the web but couldn't find any soultion that resolves this issue. My friend who has written this application has no issue on his machine. (And same issue is with Visual Studio 2010 Express for Windows Phone. I take this VS thing back, looks like it is working today with VS2010.)
I uninstalled everything and re-installed two times but no luck. Any ideas anyone??
I got it working but don't know exactly the problem except my guess is it could be some permissions issue but not sure what.
I created a brand new project and placed it under C:\Users\me\Documents\Expression\Blend 4\Projects Which is the default location. Then added all the files to it via Blend. Added the required references and it started working.
So it got me thinking if it was the location issue.
I had my project under C:\Windows Phone 7\MyProject\MyProject.csproj I moved that to C:\Users\me\Documents\Expression\Blend 4\Projects\MyProject and it works as normal.
I had already checked the permissions on folder to ensure it wasn't the issue and I am the administrator and also run the Blend as administrator.
So I don't know what the issue was but it works now after changing the project location.
Update:
I tried different variations but still didn't find exact problem but here are my tries.
These works:
C:\MyProjects\MyProjSolution\MyProject\MyProject.csproj
C:\MyProjects\Blendprojects\MyProject\MyProject.csproj
C:\WindowsPhone7\MyProject\MyProject.csproj (note I removed spaces from directory name "Windows Phone 7"
This doesn't work for some reason: C:\WindowsPhone7\Blendprojects\MyProject\MyProject.csproj
In any case, I am done with this error.