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

Bad References in .g.i.cs files?

12 Answers 662 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Ryan
Top achievements
Rank 2
Ryan asked on 20 Oct 2010, 12:57 PM
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?

12 Answers, 1 is accepted

Sort by
0
Ryan
Top achievements
Rank 2
answered on 20 Oct 2010, 01:06 PM

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...

 

 

 

 

0
Giuseppe
Telerik team
answered on 20 Oct 2010, 02:43 PM
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
0
Ryan
Top achievements
Rank 2
answered on 20 Oct 2010, 04:19 PM
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.
0
Ryan
Top achievements
Rank 2
answered on 20 Oct 2010, 07:21 PM
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..
0
Andreas
Top achievements
Rank 1
answered on 27 Jan 2011, 03:27 PM
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
0
Vrubel
Top achievements
Rank 1
answered on 13 Feb 2011, 01:54 PM
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.
0
Patrick
Top achievements
Rank 1
answered on 16 May 2011, 05:05 PM
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.
0
Florin
Top achievements
Rank 1
answered on 13 Sep 2011, 08:53 AM
Just try the Clean Solution feature in Visual Studio. It worked for me
0
Lucas
Top achievements
Rank 1
answered on 28 Sep 2011, 08:52 PM

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

0
Seing
Top achievements
Rank 1
answered on 19 Oct 2011, 10:49 PM
I was able to rebuild successfully after cleaning the solution too. Thanks!
0
Craig Corbin
Top achievements
Rank 1
answered on 27 Oct 2011, 11:33 PM
Ditto on the Clean and Rebuild
0
Rishabh
Top achievements
Rank 1
answered on 16 Aug 2016, 11:58 AM
Worked after cleaning the solution followed by a quick build. 
Tags
General Discussions
Asked by
Ryan
Top achievements
Rank 2
Answers by
Ryan
Top achievements
Rank 2
Giuseppe
Telerik team
Andreas
Top achievements
Rank 1
Vrubel
Top achievements
Rank 1
Patrick
Top achievements
Rank 1
Florin
Top achievements
Rank 1
Lucas
Top achievements
Rank 1
Seing
Top achievements
Rank 1
Craig Corbin
Top achievements
Rank 1
Rishabh
Top achievements
Rank 1
Share this question
or