Add-in DLL locked by Outlook

Add-in Express™ Support Service
That's what is more important than anything else

Add-in DLL locked by Outlook
 
Fabrice


Guest


Hello

I'm trying to update my add-in silently, which means that DLL must not be locked. For that I've enable the "shadow copy" in the manifest.
That works ... partially. My dlls are not locked except the main one (the one specified in the manifest). There is more than 20 dll locked before, and only 1 after but it's the main one, and enough to block the update process.

I initially though we had something in our code that lock the dll, so I started to disable big portion of code, without success. I finally ends up with almost a blank right docked panel, but DLL still lock.
I finally ends up with dll not blocked before this line, and blocked after this line:
this.frmReviewForm.ExplorerLayout = AddinExpress.OL.ADXOlExplorerLayout.DockRight
;

Of course after that I tried with a newly created add-in, and can't reproduce.
Then I changed the DockRight , i.e.RightReadingPanel, and the hooora, no lock anymore.

Really strange, isn't ?
Any idea where it could come from ?

Thank you
Fabrice
Posted 06 May, 2020 19:41:22 Top
Andrei Smolin


Add-in Express team


Posts: 18829
Joined: 2006-05-11
Hello Fabrice,

I can't tell.

No silent updates are possible in the generic case. There are at least two points. First off, you may change the set of COM registrations that your add-in requires. Say, you may add/remove a custom task pane. In such a case you need to *register* your add-in, not just replace files. The other point is: your DLL files are locked unless you unload them. Shadow copy allows you to deploy new *assemblies* while old assemblies' files are locked; it doesn't let you replace other files such as native-code DLLs - adxloader.dll/adxloader64.dll are among them. The only way to unload adxloader.dll/adxloader64.dll is to close the host application.


Andrei Smolin
Add-in Express Team Leader
Posted 07 May, 2020 04:31:58 Top
Fabrice


Guest


Hello Andrei,

Thank you for you quick reply.
Indeed I didn't explain well ... I don't want a full silent update, but only for minor update, so like a patch that update only our own DLL. That will allow us to decrease package size from 130Mb to 8Mb (compressed) and allow us to deploy fixes quicker.
That means that:
- We don't need to register the add-in (it's already registered)
- We don't update adx*.dll files (if we need to, it'll be a full update)
- Updated dlls will then be used only when office app are restarted

So my only problem is that the dll specified in the manifest is lock, despite shadow copy. And if I change the ExplorerLayout then it's not locked anymore ... I know it's strange and I'm also skeptical, but it's the current state :)

I'm trying to isolate the problem by removing all code around so I could send you a repro, but that's not easy to do.

I hope this is more clear now :)
Posted 07 May, 2020 04:55:04 Top
Andrei Smolin


Add-in Express team


Posts: 18829
Joined: 2006-05-11
Fabrice writes:
For that I've enable the "shadow copy" in the manifest.


It should be enabled in the manifest of the add-in version installed for the Shadow Copy feature to work.


Andrei Smolin
Add-in Express Team Leader
Posted 07 May, 2020 07:08:29 Top
Fabrice


Guest


That's the case.. Otherwise all dlls are locked. So it seems you don't have an idea where the problem comes from?
Posted 07 May, 2020 07:14:28 Top