Why unregistering a .NET service/DLL before making changes?
-
I'm developing several DLLs and a Service (vb.NET) for an application we're about to launch. I've read that when testing and during development of a Service, one must stop & unregister the service before making changes to it. I'm assuming it has to do with the CLSID, right? I've read a bunch of information regarding what a CLSID is and how it's generated but what i don't know is this .. Is the CLSID generated using file specific attributes (filename, size, MD5, path, ... etc)? If NOT then what's the purpose of unregistering and reregistering DLLs & Services? This automatically points to the second part of the question .... If (that also applies to DLLs as well) i create another version of a DLL/Service, with the same name, and want to replace the old one, and there is no compatibility issues ..... will a simple replace (overwritting the old file) do the work or is there more to it? Thnx.
-
I'm developing several DLLs and a Service (vb.NET) for an application we're about to launch. I've read that when testing and during development of a Service, one must stop & unregister the service before making changes to it. I'm assuming it has to do with the CLSID, right? I've read a bunch of information regarding what a CLSID is and how it's generated but what i don't know is this .. Is the CLSID generated using file specific attributes (filename, size, MD5, path, ... etc)? If NOT then what's the purpose of unregistering and reregistering DLLs & Services? This automatically points to the second part of the question .... If (that also applies to DLLs as well) i create another version of a DLL/Service, with the same name, and want to replace the old one, and there is no compatibility issues ..... will a simple replace (overwritting the old file) do the work or is there more to it? Thnx.
I don't think it's to do with the CLSID because that shouldn't change. It's probably because Windows will lock down the executables etc when it's registered (or keep a copy of them). You must stop the service because otherwise since the executable is running you can't overwrite it with the new one. As to unregistering them I think it might be because (in the case of DLLs) Windows may keep another copy of them somewhere and by reregistering them you're saying that there's a new copy available. Second Part of Question: As long as there are no compatability issues then replacing it should work as far as I know.
I have no idea what I just said. But my intentions were sincere.