473,385 Members | 1,798 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Trouble Compiling a Console Application at the Command Prompt

I'm new to vb.net and I have a very simple console application. When I attempt to compile it at the command prompt I get error BC30420 Sub Main not found. I know the namespace and module name but that does not seem to work. Here is my code:

Expand|Select|Wrap|Line Numbers
  1. Imports System
  2.  
  3. Module Hello
  4.  
  5.     Sub Main()
  6.  
  7.         Dim Today As Date
  8.  
  9.         System.Console.WriteLine("Name")
  10.         System.Console.WriteLine("Class")
  11.         System.Console.WriteLine("Instructor")
  12.         System.Console.WriteLine("Today's Date:  " & Today)
  13.  
  14.     End Sub
  15.  
  16. End Module

At the command prompt I enter:


vbc /main:ConsoleApplication1.Hello /out:Hello.exe Hello.vb

The root namespace on the application properties window is the name of the folder where the solution is located and Sub Main is selected as the startup object.

What's wrong with this picture?????

Any help is appreciated greatly

Ceci
Sep 10 '07 #1
1 1635
Killer42
8,435 Expert 8TB
VB.Net is totally beyond my experience. But I wonder whether perhaps you need to specify Main as Public.
Sep 10 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Oz | last post by:
This is long. Bear with me, as I will really go through all the convoluted stuff that shows there is a problem with streams (at least when used to redirect stdout). The basic idea is that my...
4
by: Jax | last post by:
I am creating an executable using CodeDom. Once the file is written, a batch file is built and runs that compiles the .cs file into an exe. Everything is fine (well almost, i'm posting twice), but...
6
by: Mark Allison | last post by:
Hi, I have an application that I want to be to run in Console mode and GUI mode. If no params are entered, I want the GUI fired up, if params are entered, then go into console mode. I believe...
11
by: Peter Steele | last post by:
I have a Windows application written in C# that I want to return a non-zero exit code when it it run. The problem is that as a Windows application, there doesn't seem to be a way to control this....
2
by: jam | last post by:
Hello all, how can I stop the current process when I am write a console application?? Also, can i run command prompt command in the console application?? the programme I am writing is to get...
1
by: Brian Mitchell | last post by:
Hello, I have 2 questions regarding the console window in a console application 1) How do I make a prompt follow the blinking cursor? For instance, I have a prompt of ">" to let the...
0
by: Zorquel | last post by:
I have an application that I want to accept command line arguments and if there are no command line arguments then go ahead and display the form and run it normally. However, if I use the command...
7
by: Abelard | last post by:
How do I programmatically minimize the console window in a VB .NET console application?
4
by: Peter Nimmo | last post by:
Hi, I am writting a windows application that I want to be able to act as if it where a Console application in certain circumstances, such as error logging. Whilst I have nearly got it, it...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.