c# wpf cs0234

Zaug 306 Reputation points

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,816 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,663 questions
0 comments No comments
{count} votes

Accepted answer
  1. Castorix31 81,356 Reputation points

    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