Creating a VB.NET Windows application using the command line

Juanito27 posted this question to the VB.NET forum on GotDotNet last week…

Command line compile Windows vb app
I need to have someone show me how to compile via command line a windows app. Could someone show me the minimum code to get a window/form up with maybe a label or button on it.

so I posted up a sample to the samples page on my personal site that shows creating two programs via the VB.NET command line compiler… first a console application, then a Windows Forms app… this page is a draft version of something I’m putting together for MSDN so let me know if you find it useful…

Creating a VB.NET Windows application using the command line

14 Responses

  1. Hi

    Great article. Really informative and simply…. What about having a table of available command line arguments with descriptions and examples when and why you would use each og them, or are there too many?


    Wayne Taylor September 14, 2004 at 8:58 am #
  2. Really great work. Exactually what a beginner such as myself was looking for. Thank you!

    Megan January 25, 2005 at 2:30 am #
  3. If you have multiple forms, just add each .vb file onto your command line (vbc.exe form1.vb form2.vb form3.vb)…. yep, devenv.exe works wonders but I was assuming that you don’t have access to Visual Studio in this case.

    Duncan Mackenzie January 25, 2005 at 4:25 pm #
  4. does the executable work for people without the framework?

    nick July 13, 2005 at 3:43 pm #
  5. Nope, the framework is still required

    Duncan Mackenzie July 13, 2005 at 3:59 pm #
  6. so how do i compile it to run on other .net free platforms?

    nick July 13, 2005 at 8:42 pm #
  7. You can’t … you can create an install that will put the .NET Framework onto the target (client) machine, but it is not possible to run the application without the framework.

    Duncan Mackenzie July 13, 2005 at 8:53 pm #
  8. hmm. ok thanks

    nick July 13, 2005 at 8:59 pm #
  9. Hallo
    Can someone help me to show on how to compile a file using the command line. I am a very basic beginner working on this compilation process. Help me out on how to do it, the commands to do it and where should I type the commands.

    Looking forward to your help. Thanks in advance.

    Please mail to

    Raj July 15, 2005 at 10:31 am #
  10. I messed up my VB part – so I had to compile my app from CMD prompt:

    1. Edit the PATH environment variable to include C:\WINNT\Microsoft.NET\Framework\v1.1.4322

    2. browse to your webapp directory:
    cd Inetpub\wwwroot\VoucherInvoice

    3. The execute following (instead of linebreaks – use spaces):





    LazyDev September 16, 2005 at 8:43 pm #
  11. i wanna use System.Web.UI features in windows application.For Eg,
    In web application, its possible to convert memory stream into a PDF.
    How will i do thet in windows application.
    Can anyone guide me??

    NaliniSelvam November 28, 2006 at 2:31 pm #
  12. pls mail me to

    NaliniSelvam November 28, 2006 at 2:35 pm #
  13. Nice !! thanks for your help about creating command line in ^^

    Odessa April 11, 2007 at 10:00 am #
  14. Hello,

    Is there a way to determine the command-line equilvalent for an existing Visual Studio project?

    This would be useful for automaticing release builds.

    John Simmons June 25, 2007 at 10:05 pm #

Leave a Reply