Reputation: 826
Using System.AddIn, is there a way to load and activate an AddIn without locking the .dll file? I want to delete or override the file to load a new version of my AddIn.
The only way to unlock the file at this moment is shutting down the AddIn. But I need to keep it always alive for incoming calls (Async-service, yes, a nightmare).
Or maybe there's another way to update AddIns at runtime, and I'm not doing it right. I'd like to know wich can be the correct way to do this. Thanks!
Upvotes: 0
Views: 694
Reputation: 4172
What about the ShadowCopy functionality of the System.AppDomain class?
I haven't given it a try yet, but you could try the following:
You can find more info on shadow copying here. Also read this thread at System.AddIn Tools and Samples page at CodePlex.
Upvotes: 1
Reputation: 51329
Once you load the new version, how would you expect handover to work?
Sounds like you need two add-ins: one (that you never change) to just receive and buffer incoming calls, and another (that you do change) to do the work of processing those calls. Then you can shut down and upgrade the processing add-in. The message-receiving add-in meanwhile can buffer the async calls until the new version of the processing add-in is up and running.
Upvotes: 0