c# wpf cs0234

Zaug 306 Reputation points
2022-01-19T13:33:38.58+00:00

i work a project with c# wpf but i can't add "System.Windows.Forms" when i write this code=
using System.Windows.Forms;
i give an error =
cs0234 The name of the "forms" type or namespace does not exist in the "System.Windows" namespace (is your assembly reference missing?)

Windows Forms
Windows Forms
A set of .NET Framework managed libraries for developing graphical user interfaces.
1,839 questions
Windows Presentation Foundation
Windows Presentation Foundation
A part of the .NET Framework that provides a unified programming model for building line-of-business desktop applications on Windows.
2,681 questions
0 comments No comments
{count} votes

Accepted answer
  1. Castorix31 81,831 Reputation points
    2022-01-19T14:06:05.053+00:00

    You must add first a Reference to System.Windows.Forms.dll

    For example, for .NET Framework 4.7.2 :
    C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.7.2\System.Windows.Forms.dll


0 additional answers

Sort by: Most helpful