Morten Nilsen
Top achievements
Rank 1
Morten Nilsen
asked on 19 Dec 2011, 04:27 PM
Hello, I'm having an issue using the GridView..
I have an application (x86) that references several assemblies (any cpu)
The application references a WPF user control library, which contains, among many other parts, a window with a RadGridView.
When code wants to open this window, I get the following exception in the constructor:
Could not load file or assembly 'Telerik.Windows.Controls.GridView, PublicKeyToken=5803cfa389c90ce7' or one of its dependencies. The system cannot find the file specified.
What is going on here?
I have an application (x86) that references several assemblies (any cpu)
The application references a WPF user control library, which contains, among many other parts, a window with a RadGridView.
When code wants to open this window, I get the following exception in the constructor:
Could not load file or assembly 'Telerik.Windows.Controls.GridView, PublicKeyToken=5803cfa389c90ce7' or one of its dependencies. The system cannot find the file specified.
What is going on here?
8 Answers, 1 is accepted
0
Morten Nilsen
Top achievements
Rank 1
answered on 19 Dec 2011, 04:28 PM
I did try setting the user control library to be x86 as well, without that having any effect.
-- Regards, Morten
-- Regards, Morten
0
Morten Nilsen
Top achievements
Rank 1
answered on 19 Dec 2011, 04:32 PM
I've now tried copying the dll files to a lib folder and reference them at that location, still the same error.
0
Morten Nilsen
Top achievements
Rank 1
answered on 19 Dec 2011, 04:36 PM
Changed my application to be Any CPU, same error.
0
Morten Nilsen
Top achievements
Rank 1
answered on 19 Dec 2011, 04:57 PM
For some reason, when I added all four at the same time earlier, they lost the path information, so I readded them one at a time from lib this time, still the same error occurs.
Clearly, these DLLs are not in the GAC like various posts I found online suggest is a problem, as this error is happening on my computer, not a client computer. This is starting to become quite frustrating!
// Regards, Morten
Clearly, these DLLs are not in the GAC like various posts I found online suggest is a problem, as this error is happening on my computer, not a client computer. This is starting to become quite frustrating!
// Regards, Morten
0
Morten Nilsen
Top achievements
Rank 1
answered on 19 Dec 2011, 05:33 PM
Okay, this is just so damned odd..
I now set a name on one of my grids and did a null check on it from code - and then the references got passed on properly.
...what?
// Regards, Morten
I now set a name on one of my grids and did a null check on it from code - and then the references got passed on properly.
...what?
// Regards, Morten
0
Morten
Top achievements
Rank 1
answered on 30 Jan 2012, 01:59 AM
You need to add some references (whomever it complains about) to your main project, not just the WPF control lib project
0
Morten Nilsen
Top achievements
Rank 1
answered on 30 Jan 2012, 08:30 AM
I don't accept that.
The problem has gone away now that I reference the telerik controls in code.
I consider this a visual studio bug - a XAML reference is not counted as a referenced library being used.
Somewhere, VS is trimming the reference hoping to save on space..
// Morten
The problem has gone away now that I reference the telerik controls in code.
I consider this a visual studio bug - a XAML reference is not counted as a referenced library being used.
Somewhere, VS is trimming the reference hoping to save on space..
// Morten
0
Paul
Top achievements
Rank 1
answered on 28 Aug 2013, 07:21 PM
I had this exact issue. My project would be fine and then a small change would cause this exact exception.
Adding a name to my grid fixed the issue.
Adding a name to my grid fixed the issue.