Click here to Skip to main content
15,906,097 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi there,

I`m quite new to c# and I have got a task to create WCF service, that uses custom dll library.
I got it working fine.

But the thing is, I need to update this dll automatically.

I have a code, where I check the dll file version on server and if it is different from my local dll file, it gets downloaded to my local workspace.

Right now I`m adding this dll in "references->add references" but the changes in WCF service Im getting only after I recompile WCF service.

I wanted to know, how to load this dll dynamical or update this service while it is running.

Thanks,
Buntuu
Posted
Comments
AlexDpars 3-Dec-13 9:02am    
Usually if you paste the new dll on the bin folder of you deployed WCF service it should work (this is how I do it and it work).
Sergey Alexandrovich Kryukov 3-Dec-13 9:09am    
There is not such thing as "bin folder". "bin" is the artifact of Configuration and does not exist after deployment. Otherwise you are right, but not if something is changed in the interface. Please see my comment below.
—SA
Sergey Alexandrovich Kryukov 3-Dec-13 9:07am    
If a DLL if of the same version and the change leaves interfaces the same (practically, all public types and the signatures of all their public members), you can replace it without recompilation of other assemblies, but you need to stop the server and restart it. Is this the case? What is the reason for DLL replacement. It feels that it means improper architecture.
—SA
Buntuu 3-Dec-13 15:07pm    
dll contains functions to connect to Horizon (http://www.horizon.lv/eng/pro/horizon/) server. It contains methods to connect, create new users, make payments, and other things. And time to time Horizon server gets updates and produce new dll file with newer version that needs to be used in WCF service as old dll not always have the same functionality as new one.

I googled and saw something about appDomains. Maybe I need to look more into that?
Sergey Alexandrovich Kryukov 3-Dec-13 15:34pm    
And what, Horizon does not know such thing as backward-compatibility and cannot tolerate the client which did not upgrade the API for a while?.. :-)
—SA

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900