DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

+ Reply to Thread
Results 1 to 2 of 2
  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?
    >
    >




Bookmarks

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


Top DevX Stories

Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL


Sponsored Links