I have managed to get it working. Although some steps I did may be omitted to get it to work, here is what I did.
1. I did a regasm /unregister on the dll but it seemed that entries still existed in the registry. So I used regedit and I removed all the entries to the GUID and progID in the registry.
2. I rebuilt the dll using a different progID, strong name key file, and GUID.
3. I copied it onto the machine and did regasm /codebase on it.
4. I added the assembly and the assembly it was dependant upon, the log4net assembly, to the global assembly cache. I did it using the Microsoft .NET Framework Configuration in Administrative Tools. You can also do it using gacutil -i command.
5. I rebooted the computer.
I think the key steps for me to get it working was adding it to the global assembly cache then rebooting the computer. All the errors seemed to have gone away after the reboot. After I rebuilt the dll under a different progID I never went back to the old dll.