I am basically trying to debug the installed version of our software by replacing the installed dll with a debug version of the same dll.
What do I need to do, to debug the installed version of my app.
- The dll file which I need to replace, exists in GAC.
- The installed version number is different to the debug version number.
- I am pretty sure (havent checked), installed version has a strong name, unsure about debug version.
There’s no real question here, but it is clear that you are likely having problems make it work:
The app is going to find the DLL that’s in the GAC first. So you’ll want to unregister it and copy your debug version in the same directory as the app’s EXE so it always loads your replacement. Registering the debug version in the GAC is technically possible but see the next bullet.
The app is going to look for a specific [AssemblyVersion] and is not going to be very happy finding another one in your replacement. Clearly you want to give your debug version the same [AssemblyVersion] so that’s not a problem. You could add a
<bindingRedirect>in the app.exe.config file if really necessary.The app might check the strong name of your replacement DLL if it doesn’t run in full trust. So be sure to sign it with the same key and skip a headache with that.