Reload dll visual studio 11 beta

May 30, 2012 at 6:22 PM

Hi,

I finally learn to use easyhook but now when I change my dll code, rebuild it (obvious), my program still use the old code, I already try change the dll manualy in /bin/debug but no success.

 

Thanks in advance.

May 31, 2012 at 1:09 AM

Be sure that the application you are hooking has been closed - it will continue to have the assembly loaded and most probably the file locked until it is restarted. A sure fired way is to reboot your machine, rebuild and see if you are now using your latest code.

Otherwise, are you registering your DLL in the GAC or copying it manually to a target applications execution directory?

When this happens to me it is usually because I have copied the DLL into the directory of the target application for debug purposes (not necessary any longer - but I have forgotten to remove them before), or while testing with the GAC. I usually uninstall from the GAC with gacutil using the /f (force) switch. But you sometimes need to reboot as well.

Cheers,

J