HELP!! cannot run 'WinForms' apps - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

HELP!! cannot run 'WinForms' apps

sumedhsumedh Posts: 103Member
whenever i try to include the 'System.WinForms' library, the compiler gives an error stating that:

WinForms does not exist in the namespace 'System'

I'm using 'beta 1' of the .NET framework and therefore have also tried using the 'System.Windows.Forms' API.....same message!!!

plz. help me guys....
tks. in advance

-sumedh

Comments

  • vladimyr67vladimyr67 Posts: 24Member
    I've run into something similar in a practice project that I've done from my textbook. What I [italic]think[/italic] you need to do is reference System.Windows.Forms.dll. Something like this if you compile from the command line...

    [code]
    csc /r:System.Windows.Forms.dll code1.cs code2.cs
    // In order for the compiler to resolve anything calling
    // the System.Windows.Forms.dll assembly, you must specify
    // it as a compiler option by referencing it

    csc /r:System.Windows.Forms.dll /out:TestApp.exe *.cs
    // the C# compiler does allow you to make use of the wildcard
    // character to inform csc.exe to add all *.cs files in the
    // current directory as part of the current build
    [/code]

    I hope that helps!
    [italic]
    [b]Discipline[/b] - The desire to do the right thing in the absence of both leadership and consequence.
    [/italic]

  • sumedhsumedh Posts: 103Member
    : I've run into something similar in a practice project that I've done from my textbook. What I [italic]think[/italic] you need to do is reference System.Windows.Forms.dll. Something like this if you compile from the command line...
    :
    : [code]
    : csc /r:System.Windows.Forms.dll code1.cs code2.cs
    : // In order for the compiler to resolve anything calling
    : // the System.Windows.Forms.dll assembly, you must specify
    : // it as a compiler option by referencing it
    :
    : csc /r:System.Windows.Forms.dll /out:TestApp.exe *.cs
    : // the C# compiler does allow you to make use of the wildcard
    : // character to inform csc.exe to add all *.cs files in the
    : // current directory as part of the current build
    : [/code]
    :
    : I hope that helps!
    : [italic]
    : [b]Discipline[/b] - The desire to do the right thing in the absence of both leadership and consequence.
    : [/italic]

    Thanks man.....that did help
    -sumedh
Sign In or Register to comment.