WinForm Compile Error


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: WinForm Compile Error

Hybrid View

  1. #1
    Robert Guest

    WinForm Compile Error

    Hello, I get this error when trying to compile with winforms
    _________________________
    Compiling...

    Microsoft (R) C# Compiler Version 7.00.8905 [NGWS runtime 2000.14.1812.10]
    Copyright (C) Microsoft Corp 2000. All rights reserved.

    system.winforms.dll: error CS0011: Referenced class
    'System.WinForms.Control' has unknown base class or interface
    'System.ComponentModel.MarshalByRefComponent'
    system.winforms.dll: error CS0011: Referenced class
    'System.WinForms.RichControl' has unknown base class or interface
    'Microsoft.Win32.Interop.IOleControl'
    system.winforms.dll: error CS0011: Referenced class
    'System.WinForms.RichControl' has unknown base class or interface
    'Microsoft.Win32.Interop.IOleObject'
    system.winforms.dll: error CS0011: Referenced class
    'System.WinForms.RichControl' has unknown base class or interface
    'Microsoft.Win32.Interop.IOleInPlaceObject'
    system.winforms.dll: error CS0011: Referenced class
    'System.WinForms.RichControl' has unknown base class or interface
    'Microsoft.Win32.Interop.IOleInPlaceActiveObject'
    system.winforms.dll: error CS0011: Referenced class
    'System.WinForms.RichControl' has unknown base class or interface
    'Microsoft.Win32.Interop.IViewObject2'
    system.winforms.dll: error CS0011: Referenced class
    'System.WinForms.RichControl' has unknown base class or interface
    'Microsoft.Win32.Interop.IPersist'
    system.winforms.dll: error CS0011: Referenced class
    'System.WinForms.RichControl' has unknown base class or interface
    'Microsoft.Win32.Interop.IPersistStreamInit'
    system.winforms.dll: error CS0011: Referenced class
    'System.WinForms.RichControl' has unknown base class or interface
    'Microsoft.Win32.Interop.IPersistPropertyBag'
    system.winforms.dll: error CS0011: Referenced class
    'System.WinForms.RichControl' has unknown base class or interface
    'Microsoft.Win32.Interop.IPersistStorage'
    system.winforms.dll: error CS0011: Referenced class
    'System.WinForms.RichControl' has unknown base class or interface
    'System.ComponentModel.ISynchronizeInvoke'
    _____________________

    Here's the little source code im using.
    ----------------------------------------
    namespace Microsoft.Samples.WinForms.Cs.SimpleHelloWorld {
    using System;
    using System.WinForms;

    public class SimpleHelloWorld : Form {

    public static int Main(string[] args) {
    Application.Run(new SimpleHelloWorld());
    return 0;
    }

    public SimpleHelloWorld() {
    this.Text = "Hello World";
    }
    }
    }
    --------------------------------
    Any ideas?



  2. #2
    Eric Gunnerson Guest

    Re: WinForm Compile Error

    You need to add the following assemblies to your command line using /r:

    system.dll
    microsoft.win32.interop.dll


    "Robert" <robertfosters@home.com> wrote in message
    news:39f4ab3d$1@news.devx.com...
    > Hello, I get this error when trying to compile with winforms
    > _________________________
    > Compiling...
    >
    > Microsoft (R) C# Compiler Version 7.00.8905 [NGWS runtime 2000.14.1812.10]
    > Copyright (C) Microsoft Corp 2000. All rights reserved.
    >
    > system.winforms.dll: error CS0011: Referenced class
    > 'System.WinForms.Control' has unknown base class or interface
    > 'System.ComponentModel.MarshalByRefComponent'
    > system.winforms.dll: error CS0011: Referenced class
    > 'System.WinForms.RichControl' has unknown base class or interface
    > 'Microsoft.Win32.Interop.IOleControl'
    > system.winforms.dll: error CS0011: Referenced class
    > 'System.WinForms.RichControl' has unknown base class or interface
    > 'Microsoft.Win32.Interop.IOleObject'
    > system.winforms.dll: error CS0011: Referenced class
    > 'System.WinForms.RichControl' has unknown base class or interface
    > 'Microsoft.Win32.Interop.IOleInPlaceObject'
    > system.winforms.dll: error CS0011: Referenced class
    > 'System.WinForms.RichControl' has unknown base class or interface
    > 'Microsoft.Win32.Interop.IOleInPlaceActiveObject'
    > system.winforms.dll: error CS0011: Referenced class
    > 'System.WinForms.RichControl' has unknown base class or interface
    > 'Microsoft.Win32.Interop.IViewObject2'
    > system.winforms.dll: error CS0011: Referenced class
    > 'System.WinForms.RichControl' has unknown base class or interface
    > 'Microsoft.Win32.Interop.IPersist'
    > system.winforms.dll: error CS0011: Referenced class
    > 'System.WinForms.RichControl' has unknown base class or interface
    > 'Microsoft.Win32.Interop.IPersistStreamInit'
    > system.winforms.dll: error CS0011: Referenced class
    > 'System.WinForms.RichControl' has unknown base class or interface
    > 'Microsoft.Win32.Interop.IPersistPropertyBag'
    > system.winforms.dll: error CS0011: Referenced class
    > 'System.WinForms.RichControl' has unknown base class or interface
    > 'Microsoft.Win32.Interop.IPersistStorage'
    > system.winforms.dll: error CS0011: Referenced class
    > 'System.WinForms.RichControl' has unknown base class or interface
    > 'System.ComponentModel.ISynchronizeInvoke'
    > _____________________
    >
    > Here's the little source code im using.
    > ----------------------------------------
    > namespace Microsoft.Samples.WinForms.Cs.SimpleHelloWorld {
    > using System;
    > using System.WinForms;
    >
    > public class SimpleHelloWorld : Form {
    >
    > public static int Main(string[] args) {
    > Application.Run(new SimpleHelloWorld());
    > return 0;
    > }
    >
    > public SimpleHelloWorld() {
    > this.Text = "Hello World";
    > }
    > }
    > }
    > --------------------------------
    > Any ideas?
    >
    >




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