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
Unable to build WinUI 3 app with WinForms enabled #3211
Comments
Frameworkが全然違うので、WinUI 3でWinformsは使えないと思うんですけど.. |
I have not explained myself well enough, but first, my purpose for wanting to use WinForms is because I think that the Windows App SDK alone may not have enough functionality yet. For example, I think it would be easier to handle multiple displays with WinForms (System.Windows.Forms.Screen). And you can use both frameworks even if they are totally different. For example, you can use WinForms classes in WPF. And even controls can be used, since there is a WindowsFormsHost. If the Windows App SDK is exclusive to other frameworks, then I would prefer not to see the option to enable WinForms or WPF. |
You can use WinForms classes by adding Reference to System.Windows.Forms.dll and other DLLs |
Thanks for the information. |
We aren't prioritizing building WinUI 3 apps with WinForms classes at this time. However, it looks like you have the information you need for this scenario. Thanks @castorix for hopping in. |
This was resolved by splitting the project within the Solution. |
Describe the bug
In WinUI 3 project, build errors occur with WinForms enabled.
Steps to reproduce the bug
Project files are:
https://github.com/shinta0806/TestWinUi3WithForms
Expected behavior
No response
Screenshots
New WinUI 3 project:
Enable Windows Forms:
MC6000 error:
Enable WPF:
MC3074 error:
NuGet package version
Windows App SDK 1.2.1: 1.2.221116.1
Packaging type
Packaged (MSIX)
Windows version
Windows 11 version 22H2 (22621, 2022 Update)
IDE
Visual Studio 2022
Additional context
Visual Studio 2022 Version 17.4.2
The text was updated successfully, but these errors were encountered: