Compilation Error

Ask general questions here.
CarlaNeves
Posts: 14
Joined: Thu Feb 26, 2009 2:08 pm

Compilation Error

Post by CarlaNeves » Tue Apr 14, 2009 12:23 pm

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

User avatar
Support Team
Site Admin
Site Admin
Posts: 11709
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Post by Support Team » Tue Apr 14, 2009 12:59 pm

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

CarlaNeves
Posts: 14
Joined: Thu Feb 26, 2009 2:08 pm

Post by CarlaNeves » Tue Apr 14, 2009 1:04 pm

Isn't there any way to run a part of the test without rebuilding the project?

Thanks,
Carla Neves

User avatar
Support Team
Site Admin
Site Admin
Posts: 11709
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Post by Support Team » Tue Apr 14, 2009 5:15 pm

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