Open DelmerJohnson opened 1 year ago
@Olina-Zhang - do we have this bug in the designer repo already?
@Tanya-Solyanik, I tried to create a Winforms control library application in VS 2019, and build it with platform: x86 to generate dll. In VS 2019, create a Winforms .net framework application(Classic designer), and import that dll by toolbox using “Choose Items…”, it is successful, and in VS 2022, do the same thing in Winforms .net framework application(Classic designer, not out-of-process designer), it gets an error about assembly is not valid. Please see following result:
VS 2019:
VS 2022:
It seems a known issue about 32bit references, internal AzDo bug: https://dev.azure.com/devdiv/DevDiv/_workitems/edit/1434297, feedback ticket: https://developercommunity.visualstudio.com/t/WinForms-NET-Framework-Projects-cant-d/1601210, is it right?
@Olina-Zhang - thank you, yes, the root cause is the same, but this issue also mentions addition of controls to the toolbox. I thought that we could add controls from 32 bit assemblies to the toolbox in the Core Designer. I know that "Choose Items" dialog is broken, but if we add a reference to the project, I expected that all controls from that reference are added to the toolbox. I think the test should look like this:
@Tanya-Solyanik I followed the scenarios you provided, it also doesn't work.
Current result: No UserControl shows up in the ToolBox after added that library for Winforms .Net application or .Net framework application with enable OOP designer
This continues to be an issue in Visual Studio 2022 17.9.0 Preview 2. Thanks for the excellent visual illustrations above!
Environment
VS 2022 (v. 17.8.0 Preview 4.0). My current project is set to use the .Net Framework 4.8.1. This is the only area to submit issues with an out-of-process designer that I can see right now.
.NET version
4.8.1 (but would also like to do with with Framework 4.7.2)
Did this work in a previous version of Visual Studio and/or previous .NET release?
Yes! It works fine in Visual Studio 2019.
Issue description
I primarily develop solutions for Microsoft Dynamics SL as an ISV. Using the out-of-process designer with the current preview of VS 2022 (v. 17.8.0 Preview 4.0 according to Help > About), I can view the SL SDK 32-bit controls on the design surface, reposition, and save them using a project initially created with VS 2019. I cannot load and view the project in the current release version (17.7.5) without seeing many yellow error messages stating “Could not find type…”. This is a welcome improvement! However, I cannot add the 32-bit controls to the Toolbox. When I try to add the Microsoft.Dynamics.SL.Controls.dll to the toolbox using “Choose Items…” after browsing on the .Net Framework Components tab, I see an error message stating “The file ‘C:\Program Files (x86)\Common Files\Microsoft Shared\DynamicsSL\Microsoft.Dynamics.SL.Controls.dll’ is not valid.” Please make is possible to add this, and other valid 32-bit dlls containing .Net Framework Component controls to the toolbox. Without this I can’t add new SL SDK controls to the form when they are required.
Steps to reproduce
When I try to add the Microsoft.Dynamics.SL.Controls.dll to the toolbox using “Choose Items…” after browsing on the .Net Framework Components tab, I see an error message stating “The file ‘C:\Program Files (x86)\Common Files\Microsoft Shared\DynamicsSL\Microsoft.Dynamics.SL.Controls.dll’ is not valid.”
Diagnostics
No response