command line compile options

G

Guest

I would like to compile a class I have built to a library. I use the following command line:
vbc /reference:Microsoft.VisualBasic.dll /t:library /sdkpath:c:\windows\microsoft.net\framework\v1.1.4322 ClockControl.vb

But I get the following errors (not all are listed):
vbc /reference:Microsoft.VisualBasic.dll /t:library /sdkpath:c:\windows\microsof
t.net\framework\v1.1.4322 /imports:System,System.Drawing ClockControl.vb
Microsoft (R) Visual Basic .NET Compiler version 7.10.3052.4
for Microsoft (R) .NET Framework version 1.1.4322.573
Copyright (C) Microsoft Corporation 1987-2002. All rights reserved.
Using alternate mscorlib.dll version 1.1.4322.573
Using alternate Microsoft.VisualBasic.dll version 7.10.3052.4


Imports System.Drawing.Drawing2D
~~~~~~~~~~~~~~~~~~~~~~~~
C:\Documents and Settings\GaryO\My Documents\Visual Studio Projects\AnalogClockClockControl.vb(3) : error BC30002: Type 'System.Windows.Forms.UserControl' is n
ot defined.

Inherits System.Windows.Forms.UserControl
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
C:\Documents and Settings\GaryO\My Documents\Visual Studio Projects\AnalogClockClockControl.vb(14) : error BC30451: Name 'ResizeRedraw' is not declared.

ResizeRedraw = True
~~~~~~~~~~~~
C:\Documents and Settings\GaryO\My Documents\Visual Studio Projects\AnalogClockClockControl.vb(18) : error BC30284: sub 'Dispose' cannot be declared 'Overrides
' because it does not override a sub in a base class.

Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)
~~~~~~~
C:\Documents and Settings\GaryO\My Documents\Visual Studio Projects\AnalogClockClockControl.vb(28) : error BC30002: Type 'System.ComponentModel.IContainer' is
not defined.

Private components As System.ComponentModel.IContainer
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
C:\Documents and Settings\GaryO\My Documents\Visual Studio Projects\AnalogClockClockControl.vb(37) : error BC30456: 'Enabled' is not a member of 'ClockControl'
...

Me.Enabled = False
~~~~~~~~~~
C:\Documents and Settings\GaryO\My Documents\Visual Studio Projects\AnalogClockClockControl.vb(38) : error BC30456: 'Name' is not a member of 'ClockControl'.

Me.Name = "ClockControl"
~~~~~~~
C:\Documents and Settings\GaryO\My Documents\Visual Studio Projects\AnalogClockClockControl.vb(49) : error BC30002: Type 'Graphics' is not defined.

This compiles correctly in the IDE but not from the command line. What I am missing?
Thanks,
Gary
 
H

Herfried K. Wagner [MVP]

* =?Utf-8?B?R2FyeSBP?= said:
I would like to compile a class I have built to a library. I use the following command line:
vbc /reference:Microsoft.VisualBasic.dll /t:library /sdkpath:c:\windows\microsoft.net\framework\v1.1.4322 ClockControl.vb

But I get the following errors (not all are listed):
vbc /reference:Microsoft.VisualBasic.dll /t:library /sdkpath:c:\windows\microsof
t.net\framework\v1.1.4322 /imports:System,System.Drawing ClockControl.vb

Add a reference to "System.Windows.Forms.dll" and "System.Drawing.dll"...
 
G

Guest

Thanks, that took care of some of them. I still can't seem to get DateTime, Point, and Graphics, even though I am referencing System.Drawing.dll, etc
Any other clues?
 
M

Mattias Sjögren

Gary,
Thanks, that took care of some of them. I still can't seem to get DateTime, Point, and Graphics, even though I am referencing System.Drawing.dll, etc.
Any other clues?

Try adding

/imports:System

to the command line, or

Imports System

to the source file.



Mattias
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top