Tuesday, April 8, 2014

Unable to copy from obj\debug to bin\debug

In Visual Studio during build it says "unable to copy from obj\debug to bin\debug"

Solution 1
1. Right-click project properties
2. Click the Build tab
3. Put this into the Build Pre-event

if exist “$(TargetPath).locked” del “$(TargetPath).locked”
if exist “$(TargetPath)” if not exist “$(TargetPath).locked” move “$(TargetPath)” “$(TargetPath).locked”

4. Rebuild

Solution 2
I have a testing project that has a reference to the project. I set Copy Local = True, and then rebuilt the referenced DLL and the problem went away


No comments:

Post a Comment