Lotusscript does not release DLL

In Visual Studio 2015, I’ve written a bespoke DLL in VB.NET to use via COM in a Lotusscript agent, and it works very nicely. However, until I close Notes, I am unable to rebuild the DLL, as the file is still is use.

If I try to delete the DLL manually to allow the rebuild, I get the error message “The action can’t be completed because the file is open in IBM Notes/Domino”.

If I close Notes, I can delete it without any problem. While this is just about bearable during development, the DLL is destined for the server, so this is obviously a problem, as I don’t want to have to restart the server to change my DLL if necessary.

For reference, I’m installing the DLL for COM use using regasm /codebase, and accessing the class using Set object = CreateObject(“Name.Class”)

I’ve tried adding Delete object in the Terminate event of the agent but that doesn’t work.

Subject: I think you’re right, Jochen

I’ve not had the opportunity to try it yet, but someone else has suggested elsewhere that restarting Amgr should have the same effect. When I do get the chance, I shall update this question for anyone else’s future reference.

Subject: Sounds familiar

The same occurs after loading a custom LotusScript Extension (LSX) in the Notes client. You can’t replace the DLL that implements the LSX until Notes has been restarted. I think that’s working ‘as designed’, although I’d agree with you that it is undesired behaviour.

On a server, it might be sufficient to restart the Agent Manager task only, instead of restarting the entire server.