I'm having this error while using HierarchicalDataTemplate control

Error 275 Cannot find the type 'local:CompanyViewModel'. Note that type names are case sensitive. Line 12 Position 35. C:\trunk\Applications\PheonixApp\Controls\LoadOnDemandControl\LoadOnDemandControl.xaml 12 35 PheonixApp

The CompanyViewModel class has been made to public and inherits from TreeViewItemViewModel.

Can anyone help me out with this error? thanks