docs-desktop
docs-desktop copied to clipboard
Troubleshoot 32-bit errors
Summary
Outstanding questions:
- Which version of Visual Studio 2022 is required?
- Is it still the
<UseWinFormsOutOfProcDesigner>True</UseWinFormsOutOfProcDesigner>
setting still valid? - Do you need to turn on the auto detection feature in Visual Studio's settings?
Fixes #1750
Internal previews
📄 File | 🔗 Preview link |
---|---|
dotnet-desktop-guide/net/winforms/visualstudio/troubleshoot-32bit.md | dotnet-desktop-guide/net/winforms/visualstudio/troubleshoot-32bit |
@tdykstra
My general issue with it is this: I think the problem is not so much if your WinForms App is 32-Bit or 64-Bit, it is rather if it relies of a 32-Bit component which can only run in a 32-Bit process. BTW: the same applies for the other way around with 64-Bit and VS 2019. It would not have been possible to run an app in the VS 2019 32-Bit bound designer, which was definitely not the case. So, we compile the assembly relevant for showing design-time-functionality in VS 2022 in 64-Bit and in VS 2019 in 32-Bit, no matter what your project's actual bitness is. Only if there is a component, which doesn't work in 32-Bit in VS 2019, or in 64-Bit in VS 2022, we run into problems. The first case almost never happens, but now, with VS 2022, the reversed case does.
@Shyam-Gupta is a better candidate to confirm and do a detailed review of this - he also wrote the respective blog post.
Which version of Visual Studio 2022 is required?
17.9 Preview 2 or newer
Is it still the <UseWinFormsOutOfProcDesigner>True</UseWinFormsOutOfProcDesigner> setting still valid?
Yes
Do you need to turn on the auto detection feature in Visual Studio's settings?
This feature is ON by default. It is controlled by following option in VS -> Tools -> Options -> Preview Features: