1

I have created a event handler for checkoutevent for Page, and I have placed dll in the correct place and restarted the com+ and IIS.

In my solution, I have added one my own custom dll and am calling one of the method in this. I am getting error "Could not load file or assembly 'myassembly.dll'", I tried to add my custom dll where I keep the event hanlder dll, and tried by placing in \bin folder and restarted the com+, iis. still am getting the same error.

Do I need to do any more thing when I add my custom dll in the event handler?

BenMorel
  • 34,448
  • 50
  • 182
  • 322
Jey
  • 2,137
  • 4
  • 22
  • 40
  • 2
    This has nothing to do with Tridion, I'm afraid. Can you call your assembly from a command prompt project? Can you check what dependencies your custom assembly has, and are those available? Could not load file or assembly means that a runtime dependency of that assembly (or the assembly itself) is not available... – Nuno Linhares Aug 06 '12 at 09:11

1 Answers1

4

The DLL you use for your Event System is loaded through the Tridion.ContentManager.config file and referred to by its location. However, this location will not be checked for possible references.

I believe following .NET standards, the usual way would be to place your referenced assemblies in the GAC so that the Event System code can find them that way.

Another option you have is assuring your references are compiled in your Event System assembly. If you have the source code of the references, you can just include them in the project, else you can use a post build tool like ILMerge to combine your assemblies into one DLL.

Last one I think we used to do in the past was to place your references in the ..\Tridion\bin folder, but I'm not sure that still works on 2011...

Bart Koopman
  • 4,835
  • 17
  • 30