Page 1 of 1

VS2019 designer issue

Posted: Tue Feb 18, 2020 11:54 am
by wjstarck
The designer is adding this code to my new forms in my plugin (OD 19.4.18):

Code: Select all

this.ButClose.BtnShape = null;
which causes the following exception to be thrown when the form loads:

Code: Select all

Error Encountered - 02/18/2020 1:44:41 PM
Unhandled exception:  Method not found: 'Void OpenDental.UI.Button.set_BtnShape(System.Object)'.
System.MissingMethodException
   at Anesthesia.FormVSMSelect.InitializeComponent()
   at Anesthesia.FormVSMSelect..ctor()
   at Anesthesia.FormOpenDentalA.menuItemSelectVSM_Click(Object sender, EventArgs e)
   at System.Windows.Forms.MenuItem.OnClick(EventArgs e)
   at System.Windows.Forms.MenuItem.MenuItemData.Execute()
   at System.Windows.Forms.Command.Invoke()
   at System.Windows.Forms.Command.DispatchID(Int32 id)
   at System.Windows.Forms.Control.WmCommand(Message& m)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
   at System.Windows.Forms.Form.WndProc(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
I can comment it out and things run fine but why is it doing this in the first place?

Edit: I also see this on FormASAP.cs, but that is the only place in OpenDental.csproj

Re: VS2019 designer issue

Posted: Tue Feb 18, 2020 2:27 pm
by cmcgehee
BtnShape was a property in OpenDental.UI.Button, but it no longer is. It sounds like your plugin is referencing an older version of OpenDentBusiness.dll. I would rebuild the OpenDentBusiness.dll, and copy that dll to the file location where your plugin references OpenDentBusiness.dll.

Re: VS2019 designer issue

Posted: Tue Feb 18, 2020 2:30 pm
by wjstarck
OK, yes your're right. Had it referenced from another solution that was being built for Middle Tier. Thanks Chris