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
2021-08-16T12:47:16.027+00:00 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
2021-08-16T13:14:42.71+00:00 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.2K Reputation points
2021-08-16T13:41:17.737+00:00 This was working fine until I loaded 3.0.
Did it work in Visual Studio 2019 too?
-
David Loring 1 Reputation point
2021-08-16T15:17:46.317+00:00 Originally was in 2013 and worked OK in that
-
Viorel 118.2K Reputation points
2021-08-16T15:28:04.233+00:00 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
2021-08-16T15:28:28.36+00:00 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
2021-08-16T15:36:32.993+00:00 Ignore this - the error was mine
-
Karen Payne MVP 35,441 Reputation points
2021-08-16T17:04:46.783+00:00 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
2021-08-16T19:31:54.56+00:00 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
2021-08-16T19:33:38.033+00:00 Missed a slash
Program Files (x86)\Reference Assemblies\Microsoft\Framework.NetFramework\v4.8
-
David Loring 1 Reputation point
2021-08-16T19:36:09.753+00:00 @Karen Payne MVP I do have the directory you mentioned. Just went to look.
-
Jack J Jun 24,516 Reputation points • Microsoft Vendor
2021-08-17T08:07:05.313+00:00 @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
2021-08-17T18:56:31.01+00:00 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
2021-08-17T19:52:16.43+00:00 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
2021-08-18T10:43:31.16+00:00 Hope I have done this right. The repository should be here.
-
David Loring 1 Reputation point
2021-08-18T10:45:13.017+00:00 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,516 Reputation points • Microsoft Vendor
2021-08-19T02:56:10.74+00:00 @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
2021-08-19T10:33:18.87+00:00 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,516 Reputation points • Microsoft Vendor
2021-08-20T09:19:07.733+00:00 @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
2021-08-21T00:50:46.313+00:00 Thanks, Yes I will report the problem as it is affecting more than one app.
Sign in to comment