Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Troubleshoot 32-bit errors #1772

Merged
merged 12 commits into from
Mar 27, 2024
Merged

Troubleshoot 32-bit errors #1772

merged 12 commits into from
Mar 27, 2024

Conversation

adegeo
Copy link
Contributor

@adegeo adegeo commented Feb 9, 2024

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

@adegeo adegeo marked this pull request as ready for review March 8, 2024 20:36
@adegeo
Copy link
Contributor Author

adegeo commented Mar 11, 2024

@tdykstra

Copy link
Contributor

@tdykstra tdykstra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, just a few nit suggestions to consider.

@KlausLoeffelmann
Copy link
Member

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.

@Shyam-Gupta
Copy link
Member

Shyam-Gupta commented Mar 26, 2024

Which version of Visual Studio 2022 is required?

17.9 Preview 2 or newer

Is it still the True 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:

image

Copy link
Member

@merriemcgaw merriemcgaw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great!

@adegeo adegeo merged commit 909decf into main Mar 27, 2024
8 checks passed
@adegeo adegeo deleted the adegeo-1750-64bit branch March 27, 2024 21:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Clarify the issue around Win32 references in WinForms and 64-bit Visual Studio
6 participants