VS2010 - Unable to install GAC/needed a tutorial/help to make the problem disappear

Sep 7, 2011 at 6:39 PM

Hi guys I'm new to the C# world and to API hooking in general, also I never studied any C++ as always been a long time Java Programmer,
I need help to solve this problem.

I created an application as a test for API hooking, that is an exact copy of the FileMonitor example application.
But when running the application in .Net Framework 4.0 I get the:

"Unable to uninstall Assembly in the GAC. Invalid path or not Admin" exception.

I also tried to compile the app for .net  2.0 but I get other errors.

So I need Help to solve this problem and a step by step tutorial would be really appreciated.

Here is a picture that represents the current problem: 

EasyHook Problem

Thanks for attention hope someone could reply soon with a simple solution.

Sep 10, 2011 at 5:57 PM

Easyhook 2.6 only works with .NET 2.0 (which errors do you get?).

There is a fix somewhere for .NET 4.0, but you need to rebuild and install the files into the GAC yourself I believe.

As for the debugging part:
I don't believe there is an "automated" way to debug.
If you inject a process in debug mode, the injected process will crash.
To debug you will have to attach the debugger to the process later on (Debug -> Attach to process).
The target must be restarted every time, or debugging won't work (you'll get the same values over and over again)

Coordinator
Mar 12, 2012 at 10:05 AM

An update on this one - I'm working on committing changes for a GAC-less version with the .NET 4.0 support also. There are some workarounds for serialization and the like that might not be suitable in all situations - but for some scenarios it works well.

This can also let you get your project to work with ILMerge