Compiling a VB.NET program from command prompt


Open a notepad and copy the below program into it and save it as "example.vb"

Imports System

Class Example
    Public Shared Sub Main()

        Console.WriteLine("Happy Learning VB.NET")
        Console.Read()
    End Sub

End Class

Compiling the VB.NET program


start -> Programs -> Microsoft visual studio -> Visual Studio Tools -> Visual studio Command prompt

Open it and go the folder where "example.vb" is saved.

Follow below steps in command prompt

c:\Program Files\Microsoft Visual Studio 9.0\VC>cd..

c:\Program Files\Microsoft Visual Studio 9.0>cd..

c:\Program Files>cd..

c:\>cd users

c:\Users>cd programcall.com

c:\Users\ProgramCall.com>cd desktop

c:\Users\ProgramCall.com\Desktop>vbc example.vb
Microsoft (R) Visual Basic Compiler version 9.0.30729.1
Copyright (c) Microsoft Corporation.  All rights reserved.

c:\Users\ProgramCall.com\Desktop>example
Happy Learning VB.NET