How to unload .NET assemblies
Hej,
I am using a .dotNet DLL that I have integrated into TestComplete via the CLR Bridge.
Example:
function DataConn(User : string, Pass : string, Host : string, Group : string, Query : string) : string;
var
CHelpers,
Ret;
begin
CHelpers := dotNET.HelpersClassLibrary.CHelpers.zctor();
Ret := CHelpers.DataConnection(User,Pass,Host,Group,Query);
CHelpers.Dispose();
if Ret.Success then
result := Ret.Rueck.OleValue
else
Log.Error(Ret.Errormessage.OleValue);
end;
My .dotNET DLL is derived from IDisposable and implements a public function Dispose.
I call this last from TestComplete, thereby releasing all resources used.
If I call a function from the DLL once, I can no longer replace the DLL with a newer version because it now remains open by tcHostingProcess.
I then have to completely close the TestComplete project each time, replace the DLL, and then reload the project.
This Calling Functions From .NET Assemblies | TestComplete Documentation only describes how the assembly is loaded into the helper hosting process. However, it does not mention how to release the assembly again.
Has anyone had a similar experience and can give me a tip?
Thank you,
Henry
Unfortunately, it's not possible then.