Page 1 of 1

Designer errors in VS 2022 with 32 bit VirtualWeb.dll

Posted: Tue Feb 14, 2023 2:08 pm
by wjstarck
Hello-

I am trying to open my plugin's forms in the VS 2022 designer but am having issues. The project builds and runs OK but I can't open any forms in the designer. I'm targeting x86.

For example:

Code: Select all

Could not find type 'OpenDental.UI.GridOD' Please make sure that the assembly that contains this type is referenced

Code: Select all

Could not find type 'OpenDental.UI.SignatureBoxWrapper'  etc.
I've tried cleaning the solution, ditching the /bin and /obj folders, closing and reopening VS but nothing seems to work.

Incidentally, I have the same problems with OD Forms. For example, if I try to open FormAbout.cs in the designer, I get

Code: Select all

The control OpenDental.FormODBase has thrown an unhandled exception in the designer and has been disabled. Exception: Could not load file or assembly 'OpenDentBusiness, Version=22.4.21.0. The system cannot find the file specified.
Any suggestions?

Re: Designer errors in VS 2022

Posted: Tue Feb 14, 2023 3:13 pm
by wjstarck
Hmmmm....works now.

The build order got messed up somehow so right clicked on the project, then Build dependencies, then fixed the build dependencies for each item (OpenDental, OpenDentBusiness, Plugin)

Re: Designer errors in VS 2022

Posted: Tue Feb 14, 2023 5:16 pm
by wjstarck
Well, that didn't last long.

The problem appears to be with the build target.

If I change the target to 'Any CPU' the designer problems go away.

However, when I try to run in the Debugger, it throws a bad image format exception related to VirtualWeb.dll and quits. It will run in the Debugger if the target is x86, but then I have the designer problem all over again.

Code: Select all

System.BadImageFormatException
  HResult=0x8007000B
  Message=Could not load file or assembly 'VirtualWeb, Version=22.1.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. An attempt was made to load a program with an incorrect format.
  Source=<Cannot evaluate the exception source>
  StackTrace:
<Cannot evaluate the exception stack trace>
So is there a 64 bit version of VirtualWeb.dll?

Re: Designer errors in VS 2022 with 32 bit VirtualWeb.dll

Posted: Wed Feb 15, 2023 12:38 pm
by wjstarck
At least I'm not alone :|

https://developercommunity.visualstudio ... -d/1601210

Is VirtualWeb.dll provided by Cybelesoft or is it an OD in-house product?

Re: Designer errors in VS 2022 with 32 bit VirtualWeb.dll

Posted: Wed Feb 15, 2023 4:10 pm
by jsalmon
We have just been getting used to editing designer changes in Any CPU (64-bit) mode and running the program in x86 mode (since we are still a 32-bit application).