Deploy new version of .NET DLL

Posted by bart.syryn on 03-Jan-2018 05:11

Hi, I have an application (webclient - appserver) that starts with the -assemblies assemblies.xml parameter. It seems that OpenEdge locks the files that are in that assemblies.xml at startup and not when they get called for the first time. I have a new version of a .NET DLL, and it has the same name. I hoped that during startup, I could just copy it over the old one, but that's not possible. So how can you deploy a new version of a DLL that's in the assemblies.xml ? Is there a way to unload it, overwrite the file, and then load it again. If the user needs to restart, then that's not a problem. Best regards Bart

Posted by SJProgress on 03-Jan-2018 05:17

Solution we use is to rename existing dll (this is possible, even if in use) and copy in new Version of dll. on next start the new version is picked.

All Replies

Posted by SJProgress on 03-Jan-2018 05:17

Solution we use is to rename existing dll (this is possible, even if in use) and copy in new Version of dll. on next start the new version is picked.

Posted by bart.syryn on 03-Jan-2018 06:39

Yes, indeed, that works !

Thanks for the tip, helps us a lot !

Posted by Laura Stern on 03-Jan-2018 08:03

Glad you found a solution. But just for the record:

1. The AVM does not "lock" assembly files.  But once they are loaded, the OS does not let you modify them.

2. Unless you use -preloadCLR, the assemblies are not loaded until one is used.  But once you've referenced something in .NET, then we will load all the assemblies listed in the assemblies.xml file.

Posted by bart.syryn on 03-Jan-2018 08:13

Hi Laura,

Thanks for the information.

I think your second point is the cause, because I use System.Net.WebClient in the startup and the login is a .NET form, so at that point, like you mention, all the assemblies are loaded, and locked by the OS.

Still find it strange that you can rename it....

Posted by Laura Stern on 03-Jan-2018 08:24

> Still find it strange that you can rename it....

Yes - I agree!

This thread is closed