Our software is no longer able to load our plugin, with Rhino 8 SR7. It seems the Eto.Wpf assembly doesn’t have a property for IsMouseCaptured on Eto.Wpf.Forms.Controls.PanelHandler.
We are receiving this exception:
System.TypeLoadException
HResult=0x80131522
Message=Method 'get_IsMouseCaptured' in type 'Eto.Wpf.Forms.Controls.PanelHandler' from assembly 'Eto.Wpf, Version=2.7.0.0, Culture=neutral, PublicKeyToken=552281e97c755530' does not have an implementation.
We have not removed that property, and it should still be in 8.8 (and onwards). It is inherited from WpfFrameworkHandlerhere.
One thing that might be going on is that there may be multiple Eto.Wpf.dll’s being loaded, if you have referenced the Eto.Platform.Wpf nuget package. If you do, ensure your plugin does not include Eto.Wpf.dll or Eto.dll.
Also, I’d recommend relying on the APIs in Eto.dll, e.g. Eto.Forms.Control.IsMouseCaptured instead of using APIs from Eto.Wpf.
Thank you for the quick reply. We aren’t doing any manual referencing of ETO stuff, we just have had this one method to override some of the Rhino UI control colors that’s been working fine in Rhino 7 and Rhino 8.0-8.6 , but now in R8 SR7 it now gives the above exception.
It looks like there is an Eto.dll and an Eto.Wpf.dll that is being copied to the bin folder of a few projects that reference RhinoWindows nuget package.
And if I manually delete that file, it then correctly uses the one from the Rhino folder as expected.
So we now have to add post-build steps to clean out those files, seems like there must be something wrong with the RhinoWindows NuGet spec file or something that is setting copy local to true for those dlls.
We had to add this to each of our projects to fix this issue:
ECHO -----------------------------
ECHO Delete Eto/Eto.Wpf.dll from BIN Folder
ECHO -----------------------------
DEL "$(TargetDir)\Eto.*.dll"
I’m not sure how your projects are set up (sdk-style,old-style), whether you’re using packages.config or PackageReference, etc. But usually with PackageReference if you do this it shouldn’t copy any references: