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

Could not load file or assembly 'System.Windows, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e' or one of its dependencies. The system cannot find the file specified

24 Answers 2137 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Asad
Top achievements
Rank 1
Asad asked on 09 Feb 2010, 05:04 PM
Hi Telerik

I have seen a few people posting about this, and have tried the mentioned solutions but i still cant seem to get this to work.

I have just recently installed visual studio 10 and silverlight 4, and installed your new release(trial) for silverlight. I keep getting this error for each page. I tried creating a new page in a new project, but it seems as soon as i try to use any telerik components i get this error :

Could not load file or assembly 'System.Windows, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e' or one of its dependencies. The system cannot find the file specified

I can see you have mentioned something about System.Windows.Controls.Data.dll  in an earlier thread, but i didnt quite understand this and cant find this dll in any of the downloads.

Best regards
Asad Agha

24 Answers, 1 is accepted

Sort by
0
Ivan
Telerik team
answered on 10 Feb 2010, 03:32 PM
Hello Asad,

Thank you for contacting us.

Actually this error rises for some different reason. Even more there is no a clear reason for it.

In the points below we summarized some particular cases all related to this error:
  • Check the target version of our RadControls library.
  • Clear the reference to the System.Windows assembly and reference it again.
  • Check your Xaml code for typos as it is described in this link.
  • Preview following links: link 1, link 2, link 3, link 4.

We hope this information will help you.

Sincerely yours,
Ivan
the Telerik team

Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Follow the status of features or bugs in PITS and vote for them to affect their priority.
0
Vinay
Top achievements
Rank 1
answered on 04 Nov 2010, 03:52 AM
Anybody still getting this error:

Please check the version of the assembly in GAC. You may either have an older version of assembly there or may not have it at all.

The correct version is available from: 'C:\Program Files\Reference Assemblies\Microsoft\Framework\Silverlight\v4.0'

Register it in GAC. The error will go away.

This can happen for "System.Windows" or "System.Windows.Browser" or some other dll based on what telerik assembly reference you have added to the project.

The way I found this was:

 - I was getting the "System.Windows" error.
 - I removed all references to telerik assemblies and also removed telerik control code from xaml.
 - compiled - there was no problem
 - added reference to "Telerik.Windows.Controls" in the project (no need to add any other code - just add the assembly reference)
 - build - we get the "System.Windows" error
 - check GAC - "System.Windows" was missing
 - added it to GAC from the path mentioned above
 - recompile project - there is no problem now
 - add refernces to "telerik.windows.controls.navigation", "telerik.windows.controls.ribbonbar", "telerik.windows.controls.input", "telerik.windows.controls.gridview"
 - compile project - will give error about not able to load "System.Windows.Browser"
 - add this dll to GAC
 - recompile - will compile properly
 - add your xaml and C# code using telerik controls
 - compile - should be fine

regards
Vinay
0
Asit Aithal
Top achievements
Rank 2
answered on 26 Jan 2011, 06:11 PM
0
Eric
Top achievements
Rank 1
answered on 20 Mar 2011, 05:19 AM
Ivan,

This is a very serious and still unresolved issue as of March 2010.  We have had the exact same problem after upgrading to VS 2010 and Silverlight 4 and have traced this error back to the Telerik controls.  None of your proposed solutions has worked for us.  We have a client demo on Wednesday and need a fixed for this on Monday.

- Eric

Could not load file or assembly 'System.Windows, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e' or one of its dependencies. The system cannot find the file specified.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.IO.FileNotFoundException: Could not load file or assembly 'System.Windows, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e' or one of its dependencies. The system cannot find the file specified.
0
Asit Aithal
Top achievements
Rank 2
answered on 20 Mar 2011, 06:47 AM
The only thing that worked for me was by me creating a new 4.0 project. But mine was a very small project.
0
Glenn Lapuyade
Top achievements
Rank 2
answered on 29 Mar 2011, 02:25 PM
I have been fighting with the same problem for a while.  In my case, I had a mapping task that I started using silverlight for, but later converted away from it.  I removed the reference to system.windows.  I removed the assembly.  I get this error in the debugger, but when I press F5 the error is skipped and works fine.  My production version does not have the problem, but I cannot update my Telerik version without giving the problem to the production system.  The application is fairly large; how do I locate the code that is trying to reference it?  Other thoughts?
thanks
Glenn
0
Glenn Lapuyade
Top achievements
Rank 2
answered on 30 Mar 2011, 03:23 PM
In case someone else is looking for options--we finally fixed this problem.  We went through stripping out unneeded files from the BIN file.  I believe one of out Telerik updates updated the tererik.web files,but I did not also update the telerik.reporting files.  There were also unneeded telerik.windows.xx.dll files in there.  Once we cleaned all of these from the bin folder the problem was gone. 
0
sonam
Top achievements
Rank 1
answered on 01 Apr 2011, 06:38 AM
hi
i am getting the following exception while running my application ,having radgridview in it.i have viewed your previous post but none of the solution is working. please help me out. exception is-
{System.Windows.Markup.XamlParseException: The invocation of the constructor on type 'Telerik.Windows.Controls.RadGridView' that matches the specified binding constraints threw an exception. [Line: 11 Position: 35] ---> System.IO.FileNotFoundException: Could not load file or assembly 'System.Windows.Data, Version=2.0.5.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.
   at Telerik.Windows.Controls.GridView.BaseItemsControl..ctor()
   at Telerik.Windows.Controls.GridView.GridViewDataControl..ctor()
   at Telerik.Windows.Controls.RadGridView..ctor()
   --- End of inner exception stack trace ---
   at System.Windows.Application.LoadComponent(Object component, Uri resourceLocator)
   at radgridexample.MainPage.InitializeComponent()
   at radgridexample.MainPage..ctor()}
0
Vlad
Telerik team
answered on 01 Apr 2011, 07:29 AM
Hello,

 Do you have reference to System.Windows.Data?

Best wishes,
Vlad
the Telerik team
0
sonam
Top achievements
Rank 1
answered on 01 Apr 2011, 08:19 AM
yes i have added the reference of system.windows.data and also have registered system.windows.data and system.windows dlls in GAC (by viewing one of the solution provided previously),but all is in vain.
0
Vlad
Telerik team
answered on 01 Apr 2011, 09:18 AM
Hello,

 Can you post the assembly version of the Telerik.Windows.Controls.GridView.dll? Please post also your Silverlight version. 

Best wishes,
Vlad
the Telerik team
0
sonam
Top achievements
Rank 1
answered on 01 Apr 2011, 09:45 AM
assembly version of Telerik.Windows.Controls.GridView is 2010.3.1110.1040
and i am using Silverlight 4.0
0
Vlad
Telerik team
answered on 01 Apr 2011, 10:00 AM
Hello,

 Can you send us the project where we can reproduce this problem to see what's going on?

Best wishes,
Vlad
the Telerik team
0
sonam
Top achievements
Rank 1
answered on 01 Apr 2011, 11:09 AM
pls tell me how to post my project(in rar format)  here?
0
Vlad
Telerik team
answered on 01 Apr 2011, 11:36 AM
Hello,

 You cannot post projects here. Please open support ticket.

All the best,
Vlad
the Telerik team
0
sonam
Top achievements
Rank 1
answered on 01 Apr 2011, 12:11 PM
pls tell me in detail the complete process to post it.
0
Maya
Telerik team
answered on 04 Apr 2011, 08:49 AM
Hi sonam,

In order to send us a project, you have to open a new support ticket and attach the application there. 

Greetings,
Maya
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
Eric
Top achievements
Rank 1
answered on 04 Apr 2011, 06:07 PM
Glenn,

Do you work for Telerik?  If not, could you please share your solution to this problem with them so they can strip out the unneeded files from the BIN file in theor next update.  Perhaps they can identify which or their updates failed to update the telerik.reporting files which had the unneeded telerik.windows.xx.dll file that is causing this error.

Ivan, are you still monitoring this problem and thread?  One of your clients told you what the solution to this problem is, but you didn't repond.  Will these unnecessary and outdated files which are causing the problem be removed in your next update?

- Eric

0
Orchid Infosys
Top achievements
Rank 2
answered on 02 Sep 2011, 07:44 AM
Hi Sonam

Have you managed to get rid of this Error? If yes, can you please post the measures you have taken? I have been battling with this Exception for quite a few days now. In my case, the exception occurs after applying any of the hotfixes after the Q2 2011. It works fine upto Q2 2011. As in your case the exception occurs in GridView, other controls works fine.

Telerik team, do you have any suggestions on this?

OrchidERP
0
Vanya Pavlova
Telerik team
answered on 02 Sep 2011, 08:09 AM
Hello Orchiderp,

 

Will you clarify that you have tried the suggestions proposed in the previous posts? 
Since you mentioned that this error occurred I believe that  this is a problem related to an update to Q2 2011. Once you ensured that the needed references has been added to your project (and all are with the same version and they reference the default installation folder), just delete the Bin/Obj folders then rebuild. If this does not help please open a separate support ticket and attach your project there. 



 

All the best,
Vanya Pavlova
the Telerik team

Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's DevProConnections Awards. We are competing in mind-blowing 20 categories and every vote counts! VOTE for Telerik NOW >>

0
Orchid Infosys
Top achievements
Rank 2
answered on 02 Sep 2011, 10:40 AM
Hello Vanya Pavlova

I have tried several possible measures as the ones in the post without any positive result, also tried deleting Bin/Obj and rebuilding. none helped me. I have now opened a support ticket and attached a Sample Project.

OrchidERP
0
Dathan
Top achievements
Rank 1
answered on 30 Dec 2011, 11:03 PM
I have had this issue when I have the Telerik controls in the GAC and also have a hint to their location in the project file (open the csproj file in a text editor).  Only way we got it working was to remove the Telerik controls from the GAC.

Edit: a hint in the project file looks like this (there is a HintPath tag):

    <Reference Include="Telerik.Windows.Controls.Data, Version=2011.2.712.1040, Culture=neutral, PublicKeyToken=5803cfa389c90ce7, processorArchitecture=MSIL">
      <HintPath>..\..\..\Telerik 2011 Q2\Telerik.Windows.Controls.Data.dll</HintPath>
    </Reference>

0
Elangeswaran
Top achievements
Rank 1
answered on 03 Jul 2012, 05:10 PM
I got the same error while I work with MVVM approach using caliburn.micro. The solution is check the telerik assemblies are added into the calling project. Though you set everything in main assembly and copy to local is marked true it will not work unless it has been referred in the calling project.
0
Jay Ecklund
Top achievements
Rank 1
answered on 24 Jun 2013, 06:50 PM

I am also receiving this error on a production web server (Windows 2008, IIS 7, .NET 4.0) running a ASP.NET web site.  This site is using the latest Telerik tools.  I know the System.Windows.dll is part of the Silverlight runtime but this site is not using any Telerik Silverlight controls.   I read the other related posts and the recommendation was to add this assembly to the GAC but I can not find this file to accomplish this.  I tried installing the Silverlight developer toolkit 2.0 version on an old developer machine and was expecting the 2.0 version of System.Windows.dll to be installed but the 3.0 version was installed instead.  Does someone have System.Windows  Version=2.0.5.0 or is there another fix for this problem?

Could not load file or assembly 'System.Windows, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e' or one of its dependencies. The system cannot find the file specified.


Tags
General Discussions
Asked by
Asad
Top achievements
Rank 1
Answers by
Ivan
Telerik team
Vinay
Top achievements
Rank 1
Asit Aithal
Top achievements
Rank 2
Eric
Top achievements
Rank 1
Glenn Lapuyade
Top achievements
Rank 2
sonam
Top achievements
Rank 1
Vlad
Telerik team
Maya
Telerik team
Orchid Infosys
Top achievements
Rank 2
Vanya Pavlova
Telerik team
Dathan
Top achievements
Rank 1
Elangeswaran
Top achievements
Rank 1
Jay Ecklund
Top achievements
Rank 1
Share this question
or