12

I have the following code, which is as generic an events system as you could imagine. When it's deployed, and I attach a debugger to the process, when an event takes place I can see the assembly getting loaded into the process, with symbols, but the code appears not to execute, and I can't get a breakpoint to bite. What am I missing?

[TcmExtension("FoobarEventsSystem")]
class Events : Tridion.ContentManager.Extensibility.TcmExtension
{
    public Events()
    {
        EventSystem.Subscribe<IdentifiableObject, TcmEventArgs>(
                      Handler, EventPhases.All, EventSubscriptionOrder.Normal);
    }
    private void Handler(IdentifiableObject subject, TcmEventArgs args, EventPhases phase)
    {
        Debug.WriteLine("foobar");
    }
}
12

Make the class public:

public class Events : Tridion.ContentManager.Extensibility.TcmExtension
  • This works. Thanks. Obvious when you know the answer. :-) – Dominic Cronin Mar 6 '13 at 16:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.