Welcome to Dream.In.Code
Become a VB Expert!

Join 137,231 VB Programmers for FREE! Get instant access to thousands of VB experts, tutorials, code snippets, and more! There are 1,833 people online right now. Registration is fast and FREE... Join Now!




Visual Basic, Visual Studio Project Command Line Compile

 
Reply to this topicStart new topic

Visual Basic, Visual Studio Project Command Line Compile

IainMackay85
24 Feb, 2007 - 10:47 AM
Post #1

New D.I.C Head
*

Joined: 7 May, 2005
Posts: 44


My Contributions
Hi, I want to automate the compiling of a vb project from visual studio using the command line so that it can be initiated by another program. i know i need to use vbc.exe but i cant get rid of the errors.

CODE

C:\Users\Mikey\Documents\Visual Studio Projects\auto compile test\Prompt>D:\WIND
OWS\Microsoft.NET\Framework\v1.1.4322\vbc.exe /t:winexe /out:C:out.vb form1.vb
Microsoft (R) Visual Basic .NET Compiler version 7.10.6001.4
for Microsoft (R) .NET Framework version 1.1.4322.573
Copyright (C) Microsoft Corporation 1987-2002. All rights reserved.

vbc : error BC30420: 'Sub Main' was not found in 'out.vb'.
C:\Users\Mikey\Documents\Visual Studio Projects\auto compile test\Prompt\Form1.v
b(2) : error BC30002: Type 'System.Windows.Forms.Form' is not defined.

    Inherits System.Windows.Forms.Form
             ~~~~~~~~~~~~~~~~~~~~~~~~~
C:\Users\Mikey\Documents\Visual Studio Projects\auto compile test\Prompt\Form1.v
b(17) : error BC30284: sub 'Dispose' cannot be declared 'Overrides' because it d
oes not override a sub in a base class.

    Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)
                                      ~~~~~~~
C:\Users\Mikey\Documents\Visual Studio Projects\auto compile test\Prompt\Form1.v
b(27) : error BC30002: Type 'System.ComponentModel.IContainer' is not defined.

    Private components As System.ComponentModel.IContainer
                          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
C:\Users\Mikey\Documents\Visual Studio Projects\auto compile test\Prompt\Form1.v
b(32) : error BC30002: Type 'System.Windows.Forms.TextBox' is not defined.

    Friend WithEvents TextBox1 As System.Windows.Forms.TextBox
                                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
C:\Users\Mikey\Documents\Visual Studio Projects\auto compile test\Prompt\Form1.v
b(33) : error BC30002: Type 'System.Windows.Forms.Button' is not defined.

    Friend WithEvents Button1 As System.Windows.Forms.Button
                                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~
C:\Users\Mikey\Documents\Visual Studio Projects\auto compile test\Prompt\Form1.v
b(35) : error BC30002: Type 'System.Windows.Forms.TextBox' is not defined.

        Me.TextBox1 = New System.Windows.Forms.TextBox
                          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
C:\Users\Mikey\Documents\Visual Studio Projects\auto compile test\Prompt\Form1.v
b(36) : error BC30002: Type 'System.Windows.Forms.Button' is not defined.

        Me.Button1 = New System.Windows.Forms.Button
                         ~~~~~~~~~~~~~~~~~~~~~~~~~~~
C:\Users\Mikey\Documents\Visual Studio Projects\auto compile test\Prompt\Form1.v
b(37) : error BC30456: 'SuspendLayout' is not a member of 'Form1'.

        Me.SuspendLayout()
        ~~~~~~~~~~~~~~~~
C:\Users\Mikey\Documents\Visual Studio Projects\auto compile test\Prompt\Form1.v
b(41) : error BC30002: Type 'System.Drawing.Point' is not defined.

        Me.TextBox1.Location = New System.Drawing.Point(16, 24)
                                   ~~~~~~~~~~~~~~~~~~~~
C:\Users\Mikey\Documents\Visual Studio Projects\auto compile test\Prompt\Form1.v
b(44) : error BC30002: Type 'System.Drawing.Size' is not defined.

        Me.TextBox1.Size = New System.Drawing.Size(168, 20)
                               ~~~~~~~~~~~~~~~~~~~
C:\Users\Mikey\Documents\Visual Studio Projects\auto compile test\Prompt\Form1.v
b(50) : error BC30002: Type 'System.Drawing.Point' is not defined.

        Me.Button1.Location = New System.Drawing.Point(208, 40)
                                  ~~~~~~~~~~~~~~~~~~~~
C:\Users\Mikey\Documents\Visual Studio Projects\auto compile test\Prompt\Form1.v
b(52) : error BC30002: Type 'System.Drawing.Size' is not defined.

        Me.Button1.Size = New System.Drawing.Size(64, 24)
                              ~~~~~~~~~~~~~~~~~~~
C:\Users\Mikey\Documents\Visual Studio Projects\auto compile test\Prompt\Form1.v
b(58) : error BC30456: 'AutoScaleBaseSize' is not a member of 'Form1'.

        Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13)
        ~~~~~~~~~~~~~~~~~~~~
C:\Users\Mikey\Documents\Visual Studio Projects\auto compile test\Prompt\Form1.v
b(58) : error BC30002: Type 'System.Drawing.Size' is not defined.

        Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13)
                                   ~~~~~~~~~~~~~~~~~~~
C:\Users\Mikey\Documents\Visual Studio Projects\auto compile test\Prompt\Form1.v
b(59) : error BC30456: 'ClientSize' is not a member of 'Form1'.

        Me.ClientSize = New System.Drawing.Size(284, 68)
        ~~~~~~~~~~~~~
C:\Users\Mikey\Documents\Visual Studio Projects\auto compile test\Prompt\Form1.v
b(59) : error BC30002: Type 'System.Drawing.Size' is not defined.

        Me.ClientSize = New System.Drawing.Size(284, 68)
                            ~~~~~~~~~~~~~~~~~~~
C:\Users\Mikey\Documents\Visual Studio Projects\auto compile test\Prompt\Form1.v
b(60) : error BC30456: 'Controls' is not a member of 'Form1'.

        Me.Controls.Add(Me.Button1)
        ~~~~~~~~~~~
C:\Users\Mikey\Documents\Visual Studio Projects\auto compile test\Prompt\Form1.v
b(61) : error BC30456: 'Controls' is not a member of 'Form1'.

        Me.Controls.Add(Me.TextBox1)
        ~~~~~~~~~~~
C:\Users\Mikey\Documents\Visual Studio Projects\auto compile test\Prompt\Form1.v
b(62) : error BC30456: 'Name' is not a member of 'Form1'.

        Me.Name = "Form1"
        ~~~~~~~
C:\Users\Mikey\Documents\Visual Studio Projects\auto compile test\Prompt\Form1.v
b(63) : error BC30456: 'Text' is not a member of 'Form1'.

        Me.Text = "Form1"
        ~~~~~~~
C:\Users\Mikey\Documents\Visual Studio Projects\auto compile test\Prompt\Form1.v
b(64) : error BC30456: 'ResumeLayout' is not a member of 'Form1'.

        Me.ResumeLayout(False)
        ~~~~~~~~~~~~~~~
C:\Users\Mikey\Documents\Visual Studio Projects\auto compile test\Prompt\Form1.v
b(75) : error BC30455: Argument not specified for parameter 'disposing' of 'Prot
ected Overrides Overloads Sub Dispose(disposing As Boolean)'.

        If TextBox1.Text = Pass Then Me.Dispose()
                                     ~~~~~~~~~~~~

C:\Users\Mikey\Documents\Visual Studio Projects\auto compile test\Prompt>

User is offlineProfile CardPM
+Quote Post

Jayman
RE: Visual Basic, Visual Studio Project Command Line Compile
24 Feb, 2007 - 12:31 PM
Post #2

Student of Life
Group Icon

Joined: 26 Dec, 2005
Posts: 6,984



Thanked: 44 times
Dream Kudos: 500
Expert In: C#, VB.NET, Java

My Contributions
You can find a tutorial here on how to use the command line to compile.
User is offlineProfile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic
Time is now: 12/4/08 03:27PM

Live VB Help!

VB Tutorials

Reference Sheets

VB Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month