Problem using RadGridView - unable to load file or assembly Telerik.Windows.Controls.GridView

9 posts, 0 answers
  1. Morten Nilsen
    Morten Nilsen avatar
    32 posts
    Member since:
    Jun 2010

    Posted 19 Dec 2011 Link to this post

    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?
  2. Morten Nilsen
    Morten Nilsen avatar
    32 posts
    Member since:
    Jun 2010

    Posted 19 Dec 2011 Link to this post

    I did try setting the user control library to be x86 as well, without that having any effect.

      -- Regards, Morten
  3. UI for WPF is Visual Studio 2017 Ready
  4. Morten Nilsen
    Morten Nilsen avatar
    32 posts
    Member since:
    Jun 2010

    Posted 19 Dec 2011 Link to this post

    I've now tried copying the dll files to a lib folder and reference them at that location, still the same error.
  5. Morten Nilsen
    Morten Nilsen avatar
    32 posts
    Member since:
    Jun 2010

    Posted 19 Dec 2011 Link to this post

    Changed my application to be Any CPU, same error.
  6. Morten Nilsen
    Morten Nilsen avatar
    32 posts
    Member since:
    Jun 2010

    Posted 19 Dec 2011 Link to this post

    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
  7. Morten Nilsen
    Morten Nilsen avatar
    32 posts
    Member since:
    Jun 2010

    Posted 19 Dec 2011 Link to this post

    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
  8. Morten
    Morten avatar
    3 posts
    Member since:
    Aug 2011

    Posted 29 Jan 2012 Link to this post

    You need to add some references (whomever it complains about) to your main project, not just the WPF control lib project
  9. Morten Nilsen
    Morten Nilsen avatar
    32 posts
    Member since:
    Jun 2010

    Posted 30 Jan 2012 Link to this post

    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
  10. Paul
    Paul avatar
    1 posts
    Member since:
    Apr 2011

    Posted 28 Aug 2013 Link to this post

    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.
Back to Top
UI for WPF is Visual Studio 2017 Ready