|
-
Jan 25th, 2003, 12:51 AM
#1
Thread Starter
Fanatic Member
CommandLine Compile Console Application: How To ?
Hey Cander,
I've been researching on how I can compile simple vb.net console with the commandline compiler... To write a computing contest at my school, i need to bring in a pc to code with. The laptop that i own is an ancient 233 mhz, 32mb ram machine, so i've given up hope of running vs.net on that machine...
Really, my only other option is to code in notepad, install the .NET framework on that machine, and use the command-line compiler to compile the .vb files i make...
So far, this is what i have in my console .vb file:
VB Code:
Module HelloWorld
Sub Main()
Console.WriteLine("Hello World!")
End Sub
End Module
This is what vs.net spits out for a vb.net console app, but obviously vs.net does something else behind the scenes...
i'm trying to compile it like this:
vbc.exe D:\MyProgram.vb D:\MyProgram.exe
It spits out bunch of errors...
so my question is, how do i do this? am i writing the coding wrong? could someone please set me up a simple hello world console coding and the way that i would compile it?
I appreciate the help!
-
Jan 27th, 2003, 02:27 AM
#2
Registered User
It looks like you have done right I just tested what you did and it worked. The only thing I had to do was to add an imports statement as it doesn't find the console object otherwize.
Code:
Imports System
Module Snabel
Sub main()
Console.WriteLine("Snabel")
End Sub
End Module
You should write "vbc.exe name.vb" instead of adding the exe thing after, because else it tries to find the specified exe.
-
Jan 29th, 2003, 04:28 PM
#3
Thread Starter
Fanatic Member
cool, that works.. but the exe gets put in the folder where vbc.exe resides (naturally) .. is there any way to specify another location to write the exe file to?
-
Jan 29th, 2003, 04:41 PM
#4
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|