c# compilation problem


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: c# compilation problem

Hybrid View

  1. #1
    Oren Hollander Guest

    c# compilation problem

    I just downloaded the .NET SDK from MS (didn't attend the PDC, so I don't
    have the VS.NET (yet...)).
    I tried the samples under the .../IntroDev/CompTest and every thing went ok,
    except for the WinForms sample.

    The System.WinForms.DLL was installed on:
    C:\WINNT\ComPlus\v2000.14.1812\System.WinForms.DLL-ZAP-8F
    while this was in the build.bat file:
    vbc ClientWinForms.vb
    /reference:\winnt\complus\v2000.14.1805\System.WinForms.dll ...

    I assumed the difference is in the version - maybe the PDC version and the
    MSDN version are different?
    Anyway, I changed it and it worked.

    Now for my question - I tried to translate the program to C# and it didn't
    compile, complaining several errors like this:

    C:\WINNT\ComPlus\v2000.14.1812\System.WinForms.DLL-ZAP-8F\System.WinForms.dl
    l: error CS0011: Referenced class 'System.WinForms.Control' has unknown base
    class or interface 'System.ComponentModel.MarshalByRefComponent'

    Does anyone knows what is wrong or why it works with VB and not with C#?



  2. #2
    Peter Drayton Guest

    Re: c# compilation problem

    The compilers always look in the CORPATH environment variable, so you don't
    need to use a full path. Change the reference to
    /reference:System.WinForms.dll and it'll work.

    --Peter

    "Oren Hollander" <oren@mailandnews.com> wrote in message
    news:3991df09@news.devx.com...
    > I just downloaded the .NET SDK from MS (didn't attend the PDC, so I don't
    > have the VS.NET (yet...)).
    > I tried the samples under the .../IntroDev/CompTest and every thing went

    ok,
    > except for the WinForms sample.
    >
    > The System.WinForms.DLL was installed on:
    > C:\WINNT\ComPlus\v2000.14.1812\System.WinForms.DLL-ZAP-8F
    > while this was in the build.bat file:
    > vbc ClientWinForms.vb
    > /reference:\winnt\complus\v2000.14.1805\System.WinForms.dll ...
    >
    > I assumed the difference is in the version - maybe the PDC version and the
    > MSDN version are different?
    > Anyway, I changed it and it worked.
    >
    > Now for my question - I tried to translate the program to C# and it didn't
    > compile, complaining several errors like this:
    >
    >

    C:\WINNT\ComPlus\v2000.14.1812\System.WinForms.DLL-ZAP-8F\System.WinForms.dl
    > l: error CS0011: Referenced class 'System.WinForms.Control' has unknown

    base
    > class or interface 'System.ComponentModel.MarshalByRefComponent'
    >
    > Does anyone knows what is wrong or why it works with VB and not with C#?
    >
    >




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