Compilation problem with WinForms


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 6 of 6

Thread: Compilation problem with WinForms

Hybrid View

  1. #1
    Ran Kornfeld Guest

    Compilation problem with WinForms

    Hello
    I am tring to compile the simple Hello World winforms version but I get the
    following error:
    error CS0234: The type or namespace name 'WinForms' does not exist in the
    class or namespace 'System'

    When I put a "/r:System.WinForms.dll" as a compiler parameter I get others
    strange errors as:

    System.WinForms.dll: error CS0011: Referenced class
    'System.WinForms.Control' has unknown
    base class or interface 'System.ComponentModel.MarshalByRefComponent'

    and

    System.WinForms.dll: error CS0011: Referenced class
    'System.WinForms.RichControl' has unk
    nown base class or interface 'Microsoft.Win32.Interop.IOleControl'

    What is the problem?

    --
    Ran kornfeld
    rankorn@bezeqint.net






  2. #2
    Daniel Pratt Guest

    Re: Compilation problem with WinForms

    You still have some missing references. Adding a reference to System.Dll and
    Microsoft.Win32.Interop.Dll should fix the problems you see here. WinDes
    uses a pretty complete list of references when it compiles. It's quite
    unlikely that you'll need all of them, but I don't think there's any harm in
    adding them.

    /R:"mscorlib.dll"
    /R:"System.Web.DLL"
    /R:"System.Net.DLL"
    /R:"System.Data.DLL"
    /R:"System.DirectoryServices.DLL"
    /R:"Microsoft.Win32.Interop.DLL"
    /R:"System.Configuration.Install.DLL"
    /R:"System.DLL"
    /R:"System.Web.Services.DLL"
    /R:"System.WinForms.DLL"
    /R:"System.Diagnostics.DLL"
    /R:"System.Text.RegularExpressions.DLL"
    /R:"System.Messaging.DLL"
    /R:"System.Timers.DLL"
    /R:"System.ServiceProcess.DLL"
    /R:"System.Drawing.DLL"
    /R:"System.Data.Design.DLL

    Also, the following site has some utilities that might help in this regard:

    http://www.razorsoft.net

    Hope that helps.

    Regards,
    Dan

    "Ran Kornfeld" <rankorn@internet-zahav.net> wrote in message
    news:39aa5b35@news.devx.com...
    > Hello
    > I am tring to compile the simple Hello World winforms version but I get

    the
    > following error:
    > error CS0234: The type or namespace name 'WinForms' does not exist in the
    > class or namespace 'System'
    >
    > When I put a "/r:System.WinForms.dll" as a compiler parameter I get others
    > strange errors as:
    >
    > System.WinForms.dll: error CS0011: Referenced class
    > 'System.WinForms.Control' has unknown
    > base class or interface 'System.ComponentModel.MarshalByRefComponent'
    >
    > and
    >
    > System.WinForms.dll: error CS0011: Referenced class
    > 'System.WinForms.RichControl' has unk
    > nown base class or interface 'Microsoft.Win32.Interop.IOleControl'
    >
    > What is the problem?
    >
    > --
    > Ran kornfeld
    > rankorn@bezeqint.net
    >
    >
    >
    >
    >




  3. #3
    Tom Dacon Guest

    Re: Compilation problem with WinForms

    Ran, I got it to work by referencing WinForms as follows in the command
    line:
    /r:\winnt\complus\v2000.14.1812\System.WinForms.dll

    Regards,
    Tom Dacon


    "Ran Kornfeld" <rankorn@internet-zahav.net> wrote in message
    news:39aa5b35@news.devx.com...
    > Hello
    > I am tring to compile the simple Hello World winforms version but I get

    the
    > following error:
    > error CS0234: The type or namespace name 'WinForms' does not exist in the
    > class or namespace 'System'
    >
    > When I put a "/r:System.WinForms.dll" as a compiler parameter I get others
    > strange errors as:
    >
    > System.WinForms.dll: error CS0011: Referenced class
    > 'System.WinForms.Control' has unknown
    > base class or interface 'System.ComponentModel.MarshalByRefComponent'
    >
    > and
    >
    > System.WinForms.dll: error CS0011: Referenced class
    > 'System.WinForms.RichControl' has unk
    > nown base class or interface 'Microsoft.Win32.Interop.IOleControl'
    >
    > What is the problem?
    >
    > --
    > Ran kornfeld
    > rankorn@bezeqint.net
    >
    >
    >
    >
    >




  4. #4
    Matt Searle Guest

    Re: Compilation problem with WinForms

    Check out:

    http://csharpindex.com/Default.asp?U.../WhichDLLs.asp

    Which shows you how to work out which DLLs to reference - Written for the
    SimpleHelloWorld application.

    I do hope Microsoft sort this out to help us newbies.

    Cheers,

    Matt.
    C# Index to resources
    http://csharpindex.com


    "Ran Kornfeld" <rankorn@internet-zahav.net> wrote in message
    news:39aa5b35@news.devx.com...
    > Hello
    > I am tring to compile the simple Hello World winforms version but I get

    the
    > following error:
    > error CS0234: The type or namespace name 'WinForms' does not exist in the
    > class or namespace 'System'
    >
    > When I put a "/r:System.WinForms.dll" as a compiler parameter I get others
    > strange errors as:
    >
    > System.WinForms.dll: error CS0011: Referenced class
    > 'System.WinForms.Control' has unknown
    > base class or interface 'System.ComponentModel.MarshalByRefComponent'
    >
    > and
    >
    > System.WinForms.dll: error CS0011: Referenced class
    > 'System.WinForms.RichControl' has unk
    > nown base class or interface 'Microsoft.Win32.Interop.IOleControl'
    >
    > What is the problem?
    >
    > --
    > Ran kornfeld
    > rankorn@bezeqint.net
    >
    >
    >
    >
    >




  5. #5
    Ran Kornfeld Guest

    Re: Compilation problem with WinForms

    Thanks Guys.
    It works.

    --
    Ran kornfeld
    rankorn@bezeqint.net



    "Matt Searle" <matt@8001dotted.com> wrote in message
    news:39aac82a@news.devx.com...
    > Check out:
    >
    > http://csharpindex.com/Default.asp?U.../WhichDLLs.asp
    >
    > Which shows you how to work out which DLLs to reference - Written for the
    > SimpleHelloWorld application.
    >
    > I do hope Microsoft sort this out to help us newbies.
    >
    > Cheers,
    >
    > Matt.
    > C# Index to resources
    > http://csharpindex.com
    >
    >
    > "Ran Kornfeld" <rankorn@internet-zahav.net> wrote in message
    > news:39aa5b35@news.devx.com...
    > > Hello
    > > I am tring to compile the simple Hello World winforms version but I get

    > the
    > > following error:
    > > error CS0234: The type or namespace name 'WinForms' does not exist in

    the
    > > class or namespace 'System'
    > >
    > > When I put a "/r:System.WinForms.dll" as a compiler parameter I get

    others
    > > strange errors as:
    > >
    > > System.WinForms.dll: error CS0011: Referenced class
    > > 'System.WinForms.Control' has unknown
    > > base class or interface 'System.ComponentModel.MarshalByRefComponent'
    > >
    > > and
    > >
    > > System.WinForms.dll: error CS0011: Referenced class
    > > 'System.WinForms.RichControl' has unk
    > > nown base class or interface 'Microsoft.Win32.Interop.IOleControl'
    > >
    > > What is the problem?
    > >
    > > --
    > > Ran kornfeld
    > > rankorn@bezeqint.net
    > >
    > >
    > >
    > >
    > >

    >
    >




  6. #6
    Tom Dacon Guest

    Re: Compilation problem with WinForms

    I haven't needed to add either system.dll or the interop dll to the command
    line in order to build the WinForms sample. The following command line
    worked just fine for me:

    vbc clientVBWin.vb /r:System.WinForms.dll /r:..\Bin\CompCS.dll
    /r:..\Bin\CompVB.dll /r:..\Bin\CompVC.dll /out:..\bin\ClientVBWin.exe
    /t:winexe

    Would anyone care to speculate why others seem to need the additional dll's,
    and my installation (done exactly according to the directions with no custom
    tinkering) doesn't?

    Slightly puzzled,
    Tom Dacon

    "Matt Searle" <matt@8001dotted.com> wrote in message
    news:39aac82a@news.devx.com...
    > Check out:
    >
    > http://csharpindex.com/Default.asp?U.../WhichDLLs.asp
    >
    > Which shows you how to work out which DLLs to reference - Written for the
    > SimpleHelloWorld application.
    >
    > I do hope Microsoft sort this out to help us newbies.
    >
    > Cheers,
    >
    > Matt.
    > C# Index to resources
    > http://csharpindex.com
    >
    >
    > "Ran Kornfeld" <rankorn@internet-zahav.net> wrote in message
    > news:39aa5b35@news.devx.com...
    > > Hello
    > > I am tring to compile the simple Hello World winforms version but I get

    > the
    > > following error:
    > > error CS0234: The type or namespace name 'WinForms' does not exist in

    the
    > > class or namespace 'System'
    > >
    > > When I put a "/r:System.WinForms.dll" as a compiler parameter I get

    others
    > > strange errors as:
    > >
    > > System.WinForms.dll: error CS0011: Referenced class
    > > 'System.WinForms.Control' has unknown
    > > base class or interface 'System.ComponentModel.MarshalByRefComponent'
    > >
    > > and
    > >
    > > System.WinForms.dll: error CS0011: Referenced class
    > > 'System.WinForms.RichControl' has unk
    > > nown base class or interface 'Microsoft.Win32.Interop.IOleControl'
    > >
    > > What is the problem?
    > >
    > > --
    > > Ran kornfeld
    > > rankorn@bezeqint.net
    > >
    > >
    > >
    > >
    > >

    >
    >




Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center