I have created a custom control which requires visual state management. As there is no support for VisualStateManager in .Net 3.5 framework. So I am using WPFToolkit v3.5.40619.1 internally in order to make use of VisualStateManager in my control project.
Now if I use that custom control in a separate project by adding reference to it, I have to add reference to WPFToolkit.dll also because my control uses it internally. But if I add a different version of WPFToolkit i.e. 3.5.40128.4 which is different than the one used in my custom control, it throws exception "Could not load file or assembly 'WPFToolkit, Version=3.5.40128.4, Culture=neutral, PublicKeyToken=51f5d93763bdb58e' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040) Error at object 'System.Windows.Controls.ControlTemplate'".
There is no problem if I use the same WPFToolkit v3.5.40619.1 which is used in my custom control internally.
Can anybody please tell me how can I solve this problem?