Page 1 of 1

Compilation Error

Posted: Tue Apr 14, 2009 12:23 pm
by CarlaNeves
Hi there,

When I build my project I get this error:

Unable to copy file "obj\Debug\Trend.exe" to "bin\Debug\Trend.exe". The process cannot access the file 'bin\Debug\Trend.exe' because it is being used by another process. (MSB3021)

Only when I close my application and start again I'm able to build and run the test.

I'm using a InvokeRemotely method in my test, could it have anything to do with it?

Can someone help?

Thanks,
Carla Neves

Posted: Tue Apr 14, 2009 12:59 pm
by Support Team
You are right, if you use the Control.InvokeRemotely method, your automation assembly (the DLL or EXE that contains the delegate being called by InvokeRemotely) is loaded by the application under test in order to invoke your delegate. The only way to release a .NET assembly again is to close the application. So, if you use the InvokeRemotely method, you will need to close your AUT when you recompile your automation code. :?

Regards,
Alex
Ranorex Support Team

Posted: Tue Apr 14, 2009 1:04 pm
by CarlaNeves
Isn't there any way to run a part of the test without rebuilding the project?

Thanks,
Carla Neves

Posted: Tue Apr 14, 2009 5:15 pm
by Support Team
You can try to put the methods that are called by the InvokeRemotely method into a separate DLL, i.e. a library project. Than you only have to restart your application when code in that DLL project changes.

Regards,
Alex
Ranorex Support Team