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

Compile Error Message: The type 'Telerik.Web.UI.RadFileExplorer' exists in both ...

4 Answers 567 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Peakbagger
Top achievements
Rank 1
Peakbagger asked on 06 Oct 2009, 03:59 AM
I was trying to troubleshoot an issue and added "telerik.web.design.dll" and "telerik.web.ui.dll" to the GAC as part of the process. I think I may have made a mistake, because now, when I attempt to build a site using RadFileExplorer (that just happens to be what I am using at the moment), I get the message below:

Compiler Error Message: CS0433: The type 'Telerik.Web.UI.RadFileExplorer' exists in both 'c:\Windows\assembly\GAC_MSIL\Telerik.Web.UI\2009.2.701.20__121fae78165ba3d4\Telerik.Web.UI.dll' and 'c:\Windows\assembly\GAC_MSIL\Telerik.Web.UI\2009.2.701.35__121fae78165ba3d4\Telerik.Web.UI.dll'

I am not sure how to fix this. I tried going back and removing the dlls I added from the GAC, but I get a "There was an error removing Telerik.Web.Design" message. 

Any suggestions would be welcome.

Thanks!

4 Answers, 1 is accepted

Sort by
0
Lini
Telerik team
answered on 08 Oct 2009, 07:41 AM
Hi,

For some reason, your application has loaded two different versions of the Telerik.Web.UI assembly - 2009.2.701.20 (for .NET 2.0) and 2009.2.701.35 (for .NET 3.5). This is probably because you have both Telerik.Web.UI assemblies in the GAC.

To fix this problem you can go through your project and make sure that wherever you are referencing the Telerik.Web.UI assembly (in the web.config, or in an ASPX page) you are using the fully qualified assembly name. For example:

"Telerik.Web.UI, Version=2009.2.701.20, Culture=neutral, PublicKeyToken=121fae78165ba3d4"

instead of just "Telerik.Web.UI". The fully qualified name includes the version number, so ASP.NET will not be confused into loading both assemblies at the same time.

Greetings,
Lini
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Sudhanva
Top achievements
Rank 1
answered on 24 Nov 2011, 09:17 AM
Hi,

I am having 2009 and 2010 version of dll in GAC.

I am getting same error in the App_Code class files whereever I have referred using Telerik.Web.UI;

I need to develop a new module with 2010 version of telerik keeping my older modules referring to 2009 version. What should I do?

Thanks in Advance.
0
Lini
Telerik team
answered on 28 Nov 2011, 10:17 AM
Hi,

There is no way to have two different versions of RadControls for ASP.NET AJAX in the same website. You need to reference only one version. If you cannot recompile your old modules to use the new version, you can try adding a <bindingRedirect> element to the Web.config file to point the old modules to the new Telerik.Web.UI.dll.

<runtime>
   <dependentAssembly>
      <assemblyIdentity name="Telerik.Web.UI" publicKeyToken="121fae78165ba3d4"/>
     <bindingRedirect oldVersion="old-version" newVersion="new-version"/>
   </dependentAssembly>
</runtime>

where old-version is your old version - e.g. 2009.1.311.35 and new-version is the new version - e.g. 2011.2.915.35

Regards,
Lini
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now
0
Sudhanva
Top achievements
Rank 1
answered on 06 Jan 2012, 08:33 AM
Can i create a custom control from 2010 RadAsyncUpload, and use that control in my website which is already referring 2009 version of telerik?

Or is there any alternative of creating such kind?

Regards,
Sudhanva
Tags
General Discussions
Asked by
Peakbagger
Top achievements
Rank 1
Answers by
Lini
Telerik team
Sudhanva
Top achievements
Rank 1
Share this question
or