This is a migrated thread and some comments may be shown as answers.

Errors on same DLL

0 Answers 151 Views
GridView
This is a migrated thread and some comments may be shown as answers.
MiddleTommy
Top achievements
Rank 1
MiddleTommy asked on 04 Dec 2009, 02:12 PM
Does anyone know why you would get an error such as this when it is obvious that the cast should work?

[A]Telerik.Windows.Controls.RadGridView cannot be cast to [B]Telerik.Windows.Controls.RadGridView. Type A originates from 'Telerik.Windows.Controls.GridView, Version=2009.3.1127.35, Culture=neutral, PublicKeyToken=5803cfa389c90ce7' in the context 'LoadNeither' at location 'D:\Users\Tommy\Documents\Visual Studio 2010\Projects\MyCards.LightSpeed3\bin\Debug\plugins\Telerik.Windows.Controls.GridView.dll'. Type B originates from 'Telerik.Windows.Controls.GridView, Version=2009.3.1127.35, Culture=neutral, PublicKeyToken=5803cfa389c90ce7' in the context 'Default' at location 'D:\Users\Tommy\Documents\Visual Studio 2010\Projects\MyCards.LightSpeed3\bin\Debug\Telerik.Windows.Controls.GridView.dll'.  Error at object 'Telerik.Windows.Controls.RadGridView' in markup file 'MyCards.Material;component/takeoffmanager.xaml'.

------------------------------------------------------------------------------

Wait I just found it but I will finish this post in case someone else finds it useful.
 I have some DLLs that are dynamically loaded (as plugins) This error occurs when you have copies of the same DLL in the Load paths.  To solve this I simply set Copy Local property of the Reference to False in the Plugin Project.
(you will have to do this every time you update references to new versions of DLLs in your project. I hope VS 2010 allows easier updating of References in Projects or even Solution Wide Reference Updating. If not maybe a JustCode feature)



No answers yet. Maybe you can help?

Tags
GridView
Asked by
MiddleTommy
Top achievements
Rank 1
Share this question
or