I am currently having an issue with Event System when I include a reference to another class inside my Event System class on Tridion 2011 instances (replicated on both 2011 SP1 Hotfix 2 and 2011 SP1 Hotfix 1). The referenced class is inside another project (same solution, using C# VS2012).
I've set up Event system by following the steps outlined here: http://elenaserghie.blogspot.com/2013/02/setup-sdl-tridion-2011-event-system-2011.html
The error being displayed:
Could not load file or assembly 'ClassLibrary1, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified.
The stacktrace:
Could not load file or assembly 'ClassLibrary1, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified. Unable to Initialize TDSE object. Initialization of the extension 'C:\Program Files (x86)\Tridion\bin\TridionNotifyTest.dll' failed.
TridionNotifyTest.EventSystem..ctor() System.RuntimeTypeHandle.CreateInstance(RuntimeType,Boolean,Boolean,Boolean&,RuntimeMethodHandleInternal&,Boolean&) System.RuntimeType.CreateInstanceSlow(Boolean,Boolean,Boolean,StackCrawlMark&) System.RuntimeType.CreateInstanceDefaultCtor(Boolean,Boolean,Boolean,StackCrawlMark&) System.Activator.CreateInstance(Type,Boolean) System.Activator.CreateInstance(Type) Tridion.ContentManager.Extensibility.TcmExtension.LoadExtensions() Tridion.ContentManager.Extensibility.TcmExtension.LoadExtensions() Tridion.ContentManager.Extensibility.TcmExtension.InitializeExtensions() Tridion.ContentManager.Session.InitializeSession() Tridion.ContentManager.Session..ctor(String,String,UserContext) Tridion.ContentManager.BLFacade.SystemFacade.InitializeUserContext(UserContext,String,String) UtilitiesTDS.GetUserContext TDSE.Initialize
Here's the Event system constructor:
public EventSystem()
{
Class1 test = new Class1(); // when this line is commented out Tridion does not show the above error
Subscribe();
}
The error happens no matter where Class1 is included.
Here's some more info about the issue:
- I've got it working in a 2013 instance (using the 2013 dll's from bin/client)
- The path inside the Tridion.ContentManager.config extensions tag points to the Program Files (x86)/Tridion/bin folder, which contains both the EventSystem project dll and the ClassLibrary1 dll
- Both the EventSystem project and the ClassLibrary1 project are Class Libraries using .NET Framework 4.5 (4.5.1 is installed on the server), and Tridion's app pool on the server is set to v4.0
- After creating the ClassLibrary1 project in VS2012 (solution -> add new project -> class library) no additional references have been added
- The only references added to the EventSystem project are the required Tridion references (taken from bin/client) and the ClassLibrary1 project:
- **Tridion.Common.dll
- Tridion.ContentManager.dll
- Tridion.ContentManager.Common.dll
- Tridion.ContentManager.Publishing.dll
- ClassLibrary1**
- ClassLibrary1 contains Class1.cs which has a string property with a getter/setter and nothing else
Other things I've tried:
- I've cleaned and rebuilt the project as well as removed and re-added the Tridion/ClassLibrary1 references
- I've tried restarting the appropriate COM+ Services, all of the Tridion services, and IIS
- I checked to see if the dll's were locked (they weren't) using the method described here: https://stackoverflow.com/questions/3072359/unblocking-a-dll-on-a-company-machine-how
My question is: Why is Tridion complaining about a missing assembly when no additional references have been added to ClassLibrary1?