Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

'Forms' is not a member of 'Windows'

I tried to change the Target Framework on my app recently from .NET Framework 4.5 to 4.5.2, but if I do I get the following error when trying to build: "'Forms' is not a member of 'Windows'" (that is, System.Windows.Forms). Changing to 4.5.1 works normally. I'm using Visual Studio 2013 Ultimate.

like image 652
andre_ss6 Avatar asked May 09 '14 20:05

andre_ss6


People also ask

Are Windows Forms still used?

As we mentioned above, WinForms is still available but the status of “maintenance mode” likely means it has no long term future. As time passed by, especially in the last 5-10 years, new tools continued to mature and rise in popularity, and each one of them offered many powerful features.

Does .NET 5 support Windows Forms?

NET 5 or later. The . NET SDK includes support for Windows Forms applications. Windows Forms is still a Windows-only framework and only runs on Windows.

What is form window in computer?

Windows Forms is a UI framework for building Windows desktop apps. It provides one of the most productive ways to create desktop apps based on the visual designer provided in Visual Studio. Functionality such as drag-and-drop placement of visual controls makes it easy to build desktop apps.

How do I add a form to WINDOWS?

Add a new form In Visual Studio, find the Project Explorer pane. Right-click on the project and choose Add > Form (Windows Forms). In the Name box, type a name for your form, such as MyNewForm. Visual Studio will provide a default and unique name that you may use.


1 Answers

I had this error when changing to 4.5.2.

In my case the error was related to a MessageBox ... I replaced: "Windows.Forms.DialogResult.Yes" (which caused the same error message) with "System.Windows.Forms.DialogResult.Yes" which did the trick.

like image 165
user3967313 Avatar answered Oct 13 '22 01:10

user3967313