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

Errors in VS2010 unless Master is open

1 Answer 41 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
John
Top achievements
Rank 1
John asked on 08 Jun 2011, 04:02 PM
Hello,
    I'm having a very strange problem. I have a Master page with a RadScriptManager and a RadMenu on it. Any of the child pages that use this Master show up with errors in the Visual Studio 2010 designer. However, if I have the Master page already opened (like double click it from the solution explorer), the errors do not appear.

The error looks like this:
Error Creating Control - MainMenu
[A]Telerik.Web.UI.RadPanelBar cannot be cast to [B]Telerik.Web.UI.RadPanelBar.


It then goes on to delineate the versions of each assembly, which match exactly. If someone really thinks It's important I'll copy the whole thing, but I can't copy it and it's a lot of generated ids and such.

I already found a similar post (I can't seem to find it right now) that suggested that Visual Studio was opening two copies of the assembly and that I should run a batch and reg file to remedy it. That did solve a problem I was having, but not this one.

Thanks for any help :)

1 Answer, 1 is accepted

Sort by
0
Georgi Tunev
Telerik team
answered on 13 Jun 2011, 12:21 PM
Hello John,

I believe that you are referring to this forum thread. This design time error is caused by having two instances of the Telerik.Web.UI assembly having different versions, loaded in the same Visual Studio AppDomain.

Besides the problem, described in the article, this could happen as a result of a reference update, e.g: a page with RadControls was loaded in design mode, the reference was updated and the page got reloaded again. This is a one-time only problem and its fix involves a Visual Studio restart.

Another possible reason for that is that the solution contains multiple projects, each referencing a different RadControls for ASP.NET AJAX assembly. Thus, loading a page with a RadControl from ProjectA in design mode and loading a page with a RadControl from ProjectB could result in the TypeCastException.

In that case I would suggest that you either update both the projects to use the same RadControls assembly, or split the projects to different solutions. Please, restart Visual Studio after any of the approaches.

Greetings,
Georgi Tunev
the Telerik team

Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

Tags
General Discussions
Asked by
John
Top achievements
Rank 1
Answers by
Georgi Tunev
Telerik team
Share this question
or