Tech Off Thread

4 posts

Forum Read Only

This forum has been made read only by the site admins. No new threads or comments can be added.

VS.Net WinForms designer error can't convert type to same type.

Back to Forum: Tech Off
  • User profile image

    Everybody has seen this error before ...

    ErrorImage One or more errors encountered while loading the designer. The errors are listed below. Some errors can be fixed by rebuilding your project, while others may require code changes.

    .. but have you ever seen anything like this?

    Warning    1    Object of type 'System.Collections.Generic.Dictionary`2[System.String,SaturnAuthor.Util.PropertyObject]' cannot be converted to type 'System.Collections.Generic.Dictionary`2[System.String,SaturnAuthor.Util.PropertyObject]'.    C:\Projects\CV Enterprise\AuthorTool\SaturnAuthor\SaturnAuthor\Form1.Designer.cs    369    0   

    Can't convert from one type to the same type? Eh?

    I should have mentioned, removing the offending line and letting it be rebuilt makes it compile again* but I can't get in to edit the form anymore Sad

    * Yes warnings are errors

    Edit: Restarting VS.Net fixes the problem.

  • User profile image

    Hah! This is fun... Could be a bug in the warning message compiler.

  • User profile image
    Sven Groot

    Sometimes this happens if they're not really the same type, but different versions of the same type. This means that one of the components is using an outdated reference. If this is the case (and I'm not saying it is) a rebuild all can fix it.

  • User profile image
    John Galt

    It definately is the references. This happens all of the time with 2005 if you don't have the control in the GAC. It doesn't update the cached one. Clear out your bin/debug directory of stuff and put the control in the GAC and everything should be fine.

Conversation locked

This conversation has been locked by the site admins. No new comments can be made.