Visual Studio 2022 Designer won't load

This forum is for programmers who have questions about the source code.
Post Reply
User avatar
dcrider
Posts: 67
Joined: Sun Sep 29, 2019 11:03 am
Contact:

Visual Studio 2022 Designer won't load

Post by dcrider » Wed Apr 06, 2022 10:55 am

Just an FYI for any other devs out there, Visual Studio 2022 fails to load all forms in the Designer view, but VS 2019 loads it just fine.

User avatar
jsalmon
Posts: 1551
Joined: Tue Nov 30, 2010 12:33 pm
Contact:

Re: Visual Studio 2022 Designer won't load

Post by jsalmon » Wed Apr 06, 2022 12:46 pm

Short answer:
Set your active solution platform to Any CPU and make sure to clean or rebuild the solution. Older versions of Open Dental may also have the 'Prefer 32-bit' check box checked within the project properties Build tab which needs to be unchecked. Restart Visual Studio if forms are still not loading correctly.

Long answer:
Visual Studio 2022 is now 64-bit and therefore can only interact with compatible libraries. Open Dental has custom controls (and custom forms) which Visual Studio needs to load in before it knows how to draw (or paint) them within the interactive designer. Therefore, the libraries (OpenDental, OpenDentBusiness, etc) need to be compiled in a way that is compatible with a 64-bit process (Visual Studio in this case). Setting the solution platform to Any CPU will cause Open Dental and other projects to be compiled against the MSIL Processor Architecture which is compatible with both 32-bit and 64-bit processes. You may have to restart Visual Studio after recompiling since I'm not an expert on when or how Visual Studio loads or caches our custom controls.
The best thing about a boolean is even if you are wrong, you are only off by a bit.

Jason Salmon
Open Dental Software
http://www.opendental.com

Post Reply