views:

128

answers:

1

My .Net program in C# is referencing a proprietary DLL, which my program uses to access their API. Everything works great.. however, when I uninstall my program (add/remove programs), the original program (not mine) will no longer run because it appears that the DLL file has been dereferenced or unregistered by Windows/.Net.

I've gone as far as copying the DLL file into a new directory, and referencing my C# solution to this new location, but the same thing happens. I'm certain it has something to do with the Identity of the DLL in the GAC or registry.

I'm using Visual Studio 2008, and as I mentioned, my solution is in C#. Can someone help me configure my solution so that a reference to a DLL will create a new localized copy/registration, so that when my program is uninstalled it will not interfere with the original vendor's DLL?

I am a veteran coder, but a Windows .Net newbie.

A: 

Are you using ClickOnce to install your application? If so, mark the DLL as a "Prerequisite". Otherwise it's possible you may install a newer version of the DLL over the original.

Jan Bannister
No, it is not a ClickOnce app. I've had this dereferencing DLL issue whether it's a C# console app or a C# service. When I uninstall either, the original vendor's program breaks because the DLL has been unregistered.I'm trying every permutation now trying to hack away at a solution, such as making the references "Isolated" in the service solution References list, and making it "Permanent" in the service installer References list.I'm just looking for the best practices way to isolate a new copy of the DLL so that it does not mess with the original upon uninstallation of MY app. Thanks!
Patsy