Bad References in .g.i.cs files?

13 posts, 0 answers
  1. Ryan
    Ryan avatar
    27 posts
    Member since:
    Aug 2010

    Posted 20 Oct 2010 Link to this post

    I been developing and testing and just switched from debug to release.  When I do so I get build errors on release.  Switch back to debug works fine.  I tried cleaning, deleting and the telerik referneces and re-adding them. 

    The errors look like this and are only for the 'RadGridView' & 'RadComboBox'
    • Error 9 The type or namespace name 'RadGridView' could not be found (are you missing a using directive or an assembly reference?) C:\tfs\SubStationAccess\NU.SubStationAccess\obj\Release\Views\CurrentView.g.i.cs 58 18 NU.SubStationAccess.Client
    • Error 9 The type or namespace name 'RadComboBox' could not be found (are you missing a using directive or an assembly reference?) C:\tfs\SubStationAccess\NU.SubStationAccess\obj\Debug\Views\UpdateView.g.i.cs 52 18 NU.SubStationAccess.Client

    I have the following references with copy local set to true.

    • Telerik.Windows.Controls
    • Telerik.Windows.Controls.Charting
    • Telerik.Windows.Controls.Data
    • Telerik.Windows.Controls.GridView
    • Telerik.Windows.Controls.Input
    • Telerik.Windows.Data

    What could be the problem?
  2. Ryan
    Ryan avatar
    27 posts
    Member since:
    Aug 2010

    Posted 20 Oct 2010 Link to this post

    Changed teh build output to diagnostic and found this. Ran the upgrade wizard on the SL project to double check and got  the same result.

    warning : Client proxy generation for service 'NU.SubStationAccess.Web.Services.SubStationAccess' failed: Microsoft (R) Silverlight Service Model Proxy Generation Tool

    warning : [Microsoft (R) Silverlight SDK, Version 4.0.50826.0]

    warning : Copyright (c) Microsoft Corporation. All rights reserved.

    warning : Error: Cannot load reference assembly

     

    'C:\Program Files (x86)\Telerik\RadControls for Silverlight Q2 2010 SP1\Binaries\Silverlight\Telerik.Windows.Controls.Data.dll'
    warning : Cannot load file C:\Program Files (x86)\Telerik\RadControls for Silverlight Q2 2010 SP1\Binaries\Silverlight\Telerik.Windows.Controls.Data.dll as an Assembly. Check the FusionLogs for more Information.
    warning : Could not load file or assembly 
    'file:///C:\Program Files (x86)\Telerik\RadControls for Silverlight Q2 2010 SP1\Binaries\Silverlight\Telerik.Windows.Controls.Data.dll' or one of its dependencies. Operation is not supported. (Exception from HRESULT: 0x80131515)

     

     

    warning : An attempt was made to load an assembly from a network location which would have caused the assembly to be sandboxed i

     

    n previous versions of the .NET Framework. This release of the .NET Framew...

     

     

     

     

  3. DevCraft banner
  4. Giuseppe
    Admin
    Giuseppe avatar
    2363 posts

    Posted 20 Oct 2010 Link to this post

    Hi Ryan,

    You will need to "unblock" the assembly files in order to resolve the problematic behavior -- you can find more information here.

    Hope this helps.


    All the best,
    Freddie
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  5. Ryan
    Ryan avatar
    27 posts
    Member since:
    Aug 2010

    Posted 20 Oct 2010 Link to this post

    The files are not blocked.  I looked at properties on all references.  Any other ideas?  I also tried direct references instead of the GAC. Same result.
  6. Ryan
    Ryan avatar
    27 posts
    Member since:
    Aug 2010

    Posted 20 Oct 2010 Link to this post

    Okay I don't like this but to fix it.... I commented out all the places in the xaml where the telerik controls were used (thankfully this one is MVVM) saved.  Then I was able to compile (???).  Then uncomment the xaml and it worked again..
  7. Andii
    Andii avatar
    17 posts
    Member since:
    Nov 2006

    Posted 27 Jan 2011 Link to this post

    Hey, i had the same problem and followed the comment > uncomment hack and now it works.
    I got this problem when moving the project from one location on my disk to another when checking the project in to TFS (also the references
    had to be pointed out again since the telerik dll files where at another location). I think you will only get problem this if you
    dont use the GAC installed version.

    ALSO,. thanks Ryan for that hack, saved me some crazy hours :)

    //andreas
  8. Vrubel
    Vrubel avatar
    1 posts
    Member since:
    May 2010

    Posted 13 Feb 2011 Link to this post

    solution that I found.
    change project target to Silverlight 3 and back to Silverlight 4.
    *.g.i.cs files regenerated with full namespace path for used classes.
  9. Patrick
    Patrick avatar
    1 posts
    Member since:
    Oct 2008

    Posted 16 May 2011 Link to this post

    I had same exact error after upgrade to 2011 Q1 release for project checked out of TFS.  This solution worked for us. Thanks for posting it. Save me lots of time.
  10. Florin
    Florin avatar
    1 posts
    Member since:
    Apr 2011

    Posted 13 Sep 2011 Link to this post

    Just try the Clean Solution feature in Visual Studio. It worked for me
  11. Lucas
    Lucas avatar
    1 posts
    Member since:
    Jul 2010

    Posted 28 Sep 2011 Link to this post

    I was able to do a clean and then Rebuild the solution as well. It seemed to do the trick.

  12. Seing
    Seing avatar
    1 posts
    Member since:
    Oct 2011

    Posted 19 Oct 2011 Link to this post

    I was able to rebuild successfully after cleaning the solution too. Thanks!
  13. Craig Corbin
    Craig Corbin avatar
    6 posts
    Member since:
    Sep 2008

    Posted 27 Oct 2011 Link to this post

    Ditto on the Clean and Rebuild
  14. Rishabh
    Rishabh avatar
    1 posts
    Member since:
    Aug 2016

    Posted 16 Aug Link to this post

    Worked after cleaning the solution followed by a quick build. 
Back to Top
DevCraft banner