Getting a design time error that appears to have nothing to do with the design
Severity Code Description Project File Line Suppression State
Message The designer could not be shown for this file because none of the classes within it can be designed. The designer inspected the following classes in the file:
ContactQuery --- The base class 'System.Windows.Forms.Form' could not be loaded. Ensure the assembly has been referenced and that all projects have been built. 0
Visual Studio Community edition 2022 Preview Ver 3.0
Windows Forms
-
David Loring 1 Reputation point
Aug 16, 2021, 12:47 PM This was working fine until I loaded 3.0. Then it stopped working. The Forms.dll is referenced and the code looks OK in the designer.
-
David Loring 1 Reputation point
Aug 16, 2021, 1:14 PM Upgraded the projects to .Net 4.8 from 4.5. Getting a different error now.
Severity Code Description Project File Line Suppression State
Message The designer could not be shown for this file because none of the classes within it can be designed. The designer inspected the following classes in the file:RCCDEMain --- The base class 'System.Void' cannot be designed. 0
-
Viorel 118.4K Reputation points
Aug 16, 2021, 1:41 PM This was working fine until I loaded 3.0.
Did it work in Visual Studio 2019 too?
-
David Loring 1 Reputation point
Aug 16, 2021, 3:17 PM Originally was in 2013 and worked OK in that
-
Viorel 118.4K Reputation points
Aug 16, 2021, 3:28 PM If it now does not work without any change in the sources, then I think that you can report the problem. (Check if there is a "Send Feedback" in Help menu). Later check if it works in released Visual Studio 2022.
-
David Loring 1 Reputation point
Aug 16, 2021, 3:28 PM Now it does not work in 2013 - different error. The Button clicked event insists on being a toolstripitem clicked event. Looks as if 3.0 has altered the DLLs for all the versions.
-
David Loring 1 Reputation point
Aug 16, 2021, 3:36 PM Ignore this - the error was mine
-
Karen Payne MVP 35,441 Reputation points
Aug 16, 2021, 5:04 PM Is the System.Windows.Forms loaded from
C:\Program Files\dotnet\packs\Microsoft.WindowsDesktop.App.Ref\5.0.0\ref\net5.0
Or another location?
-
David Loring 1 Reputation point
Aug 16, 2021, 7:31 PM The forms dll is loaded but all the system dlls are in Program Files (x86)\Reference Assemblies\Microsoft\Framework.NetFramework\v4.8. No idea why as it is a 64 bit PC.
-
David Loring 1 Reputation point
Aug 16, 2021, 7:33 PM Missed a slash
Program Files (x86)\Reference Assemblies\Microsoft\Framework.NetFramework\v4.8
-
David Loring 1 Reputation point
Aug 16, 2021, 7:36 PM @Karen Payne MVP I do have the directory you mentioned. Just went to look.
-
Jack J Jun 24,521 Reputation points • Microsoft Vendor
Aug 17, 2021, 8:07 AM @David Loring , Could you provide the details to reproduce your problem? Or you could upload your project here via Onedrive and Github. It will be better for us to analyze your problem.
-
David Loring 1 Reputation point
Aug 17, 2021, 6:56 PM Happy to upload. Tell me how.
(I posted this reply several hours ago but it is not showing)
-
Karen Payne MVP 35,441 Reputation points
Aug 17, 2021, 7:52 PM Rather than upload to a site, instead push your Visual Studio solution to a GitHub repository.
See https://learn.microsoft.com/en-us/learn/modules/visual-studio-github-push/
-
David Loring 1 Reputation point
Aug 18, 2021, 10:43 AM Hope I have done this right. The repository should be here.
-
David Loring 1 Reputation point
Aug 18, 2021, 10:45 AM By the way when I first opened VS this morning the designer displayed OK. I closed the project and opened another that has the same problem so I closed it and reopened the RCCDataExtractor project and the problem had returned.
-
Jack J Jun 24,521 Reputation points • Microsoft Vendor
Aug 19, 2021, 2:56 AM @David Loring , Could you check you link again? After I opened the link, it returns the error 'Page not Found' .
-
David Loring 1 Reputation point
Aug 19, 2021, 10:33 AM Worked OK for me. Try https://github.com/ThePuterMan/RCCDataExtractor
Just looked at it. It is Private. I will set it to Public
-
Jack J Jun 24,521 Reputation points • Microsoft Vendor
Aug 20, 2021, 9:19 AM @David Loring , based on my test, I indeed reproduced your problem. It is hard for me to solve the design problem. So I suggest that you could create a new winform app to rewrite the app. If you still want to figure out the problem , I recommend that you could report a problem in Developer Community.
-
David Loring 1 Reputation point
Aug 21, 2021, 12:50 AM Thanks, Yes I will report the problem as it is affecting more than one app.
Sign in to comment