question

DavidLoring-7122 avatar image
0 Votes"
DavidLoring-7122 asked DavidLoring-7122 commented

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
· 20
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

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.

0 Votes 0 ·

This was working fine until I loaded 3.0.

Did it work in Visual Studio 2019 too?


0 Votes 0 ·

Originally was in 2013 and worked OK in that

0 Votes 0 ·
Show more comments

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.

0 Votes 0 ·
Show more comments

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    
0 Votes 0 ·

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?

0 Votes 0 ·

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.

0 Votes 0 ·

Missed a slash

Program Files (x86)\Reference Assemblies\Microsoft\Framework.NetFramework\v4.8

0 Votes 0 ·

@karenpayneoregon I do have the directory you mentioned. Just went to look.

0 Votes 0 ·

@DavidLoring-7122 , 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.

0 Votes 0 ·

@JackJJun-MSFT

Happy to upload. Tell me how.

(I posted this reply several hours ago but it is not showing)

0 Votes 0 ·

Rather than upload to a site, instead push your Visual Studio solution to a GitHub repository.

See https://docs.microsoft.com/en-us/learn/modules/visual-studio-github-push/

0 Votes 0 ·

Hope I have done this right. The repository should be here.

https://github.com/ThePuterMan/RCCDataExtractor.git

0 Votes 0 ·

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.

0 Votes 0 ·

@DavidLoring-7122 , Could you check you link again? After I opened the link, it returns the error 'Page not Found' .

0 Votes 0 ·
Show more comments

0 Answers