MvvmLight EventToCommand on a TreeView throwing NullReferenceException MvvmLight EventToCommand on a TreeView throwing NullReferenceException wpf wpf

MvvmLight EventToCommand on a TreeView throwing NullReferenceException


... I am an idiot. After I read the stack trace I posted here, properly, I realised the problem was probably in the xmlns declaration. Sure enough, I hadn't re-added the assemblies as references to the project.

I was tempted to just delete the question, but I've done something similar before with WPF last time I played with it (over a year ago), and hopefully my stupidity will help someone else with their's.

<i:rant>

As a side note, the exceptions that are generated in such a case are terrible. Would it really be that difficult to raise an exception that said "Namespace 'i' could not be loaded, are you missing a reference?"? I even had intellisense using the <i:...> namespace.

</i:rant>