Eto Panel and recent Windows WIPs

I have an Eto panel in my plug-in that inherits from Eto.Forms.Panel.

This setup worked in the past, but with the recent WIPs (maybe the last 2-3 months) I ran into an error message stating “panelType must implement IWin32Window or be derived from System.Windows.FrameworkElement or Eto.Forms.Controls”.

However, this message only seems to show if the used Eto version is older than the WIP build. If I replace the Eto files in my RHI package with the latest version (or just build the plug-in again), it gets installed correctly and works without problems.

Edit: For example, Eto version 2.2.5912.34416 throws the error with the current WIP, while version 2.2.5958.9626 doesn’t.

Any idea why?

@curtisw - any ideas?

@JohnM probably knows about this…

This is probably due to @brian’s change to strong name Eto.

My guess is when you use a non-strong named version of Eto in the same process, then you effectively get two copies of Eto running whereas before it would only use one.

Rhino now expects you to use the strong named version of Eto.

I would agree with @curtisw explanation, RhinoWindows throws the exception if the specified class is not a supported type. This is the code that is throwing the exception:

  // Class types currently supported
  if (panelType.GetInterface("IWin32Window") == null &&
      !panelType.IsSubclassOf(typeof(FrameworkElement)) &&
      !panelType.IsSubclassOf(typeof(Eto.Forms.Control))
    )
    throw new ArgumentException("panelType must implement IWin32Window or be derived from System.Windows.FrameworkElement or Eto.Forms.Controls");

Do I resolve this by specifying Eto’s PublicKeytoken in the project file?

<Reference Include="Eto, Version=2.2, Culture=neutral, PublicKeyToken=552281e97c755530, processorArchitecture=MSIL">