Closed xiaominzi closed 7 years ago
It looks like Visual Studio is finding the wrong version of WeifenLuo.WinFormsUI.Docking.dll. We have made a small number of custom modifications to our copy of the DockPanelSuite source code over the years, and so the ATF project file, Atf.Gui.WinForms.vs2010.csproj, really requires the version of DockPanelSuite that we ship in our ThirdParty directory.
Here are some things to try:
If you're still stuck, you can make sure that you can compile and run the ATF sample apps, like CircuitEditor. Assuming that works, then there must be a problem or conflict with your project settings.
Please let me know how you fix this.
Thanks for your recommendation !
I solved this exception by using \ThirdParty\DockPanelSuite\WeifenLuo.WinFormsUI.Docking.dll instead of the version 2.9.0.0 I got from nuget !
I want to create three forms inherited from "WeifenLuo.WinFormsUI.Docking.DockContent". I add a dockpanel(2.3.2.0) from toolbox to MainForm ! While when the form DockTo(myPanel, DockStyle.Fill) , this can't work normally like this:
I am learning other samples to find the right way to create a standard "dockForm". Maybe I should implements IControlHostClient and register my own control.
I implements IControlHostClient and register my own control. And it works!
Also, the problem showed in the picture was called by adding a form into a panel. It need to set the form's topLevel = false, and call the form's own Show() function after the controlHostService call the Show(control) function!
Form1.TopLevel = false;
Form1.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
m_controlHostService.RegisterControl( control, controlinfo, hostclient);
m_controlHostService.Show(control );
Form1.Show();
error.description:
Fail to load file or assemblies “WeifenLuo.WinFormsUI.Docking, Version=2.3.2.0, Culture=neutral, PublicKeyToken=null” or one of it's dependencies.The definition of the assemblies we found didn't match with the assemblies reference. Exception came from HRESULT:0x80131040
My experiment :
I use VS2010, got dockpanelsuite 2.9.0.0(why the version in exception is 2.3.2.0) by "nuget". I also tried generated dockpanel 2.5/2.6/2.7 DLL by meself, but I can't solved this exception! (It has no dependency according to the explanation in NuGet)
Wanted
Is there anybody who has suffered this or similar exception? Thanks for your experience !