User controls crashing VB2010

Asked By Gerry H.
03-Nov-09 03:46 PM
Earn up to 0 extra points for answering this tough question.

Hello every one!!

I´m using UserControls to display diferent data on myapp,  I´m adding this controls into a Container(Panel) and set visible property = false to show and hide as the user click on my navegation bar and keep all of them active during execution.

When i click "Debbuging" button for the first time i worked really nice, all of my user controls showed correctly...BUT...

once i closed my app exec and made some changes on some of the controls when rebuilding VS throws an error when trying to debugg again:

Error 1 Unable to copy file "obj\x86\Debug\BLABLA.exe" to "bin\Debug\BLABLA.exe". The process cannot access the file 'bin\Debug\BLABLA.exe' because it is being used by another process. 

Then i erased everything on my debug folder, clean the app, rebuild and worked, but once again failed when making changes. What am I doing wrong??

 

 

  Try these.

[)ia6l0 iii replied to Gerry H.
04-Nov-09 01:50 PM
I am not sure if this fix applies to the 2010 version you have. But its worth a try.  Look at the Workarounds section in this link.

And the most widely used solution in this case, is to create a pre-build command under the project properties. 
if exist "$(TargetPath).locked" del "$(TargetPath).locked"  
if not exist "$(TargetPath).locked" move "$(TargetPath)"  "$(TargetPath).locked"

Right-Click on your Project - Choose Properties - Under the "Build Events" tab , ente the above commands in the Pre-build event command line.


Create New Account