using System.Windows.Forms: namespace error

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • piedpiper
    New Member
    • Feb 2008
    • 5

    using System.Windows.Forms: namespace error

    Dear All,

    When i use:
    using System.Windows. Forms;

    I get the following error when compiling:

    Error 3 : The type or namespace name 'Windows' does not exist in the namespace 'System' (are you missing an assembly reference?)

    How can i add windows in to the system namespace, any help is appreciated.

    Thanks in advance.
  • Plater
    Recognized Expert Expert
    • Apr 2007
    • 7872

    #2
    What kind of project are you creating?
    A web application will not have the references to add that namespace

    Comment

    • piedpiper
      New Member
      • Feb 2008
      • 5

      #3
      Originally posted by Plater
      What kind of project are you creating?
      A web application will not have the references to add that namespace
      hey..thanks for the reply...i actually opened it as a console app in visual studio..guess dats y i was gettin dat error.
      later compiled it thru csc.exe with the /target:exe switch..and it worked.
      thanks for the reply again.

      Comment

      • Plater
        Recognized Expert Expert
        • Apr 2007
        • 7872

        #4
        You can change what it compiles too in the properties of the project.

        Comment

        Working...