473,434 Members | 1,657 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes and contribute your articles to a community of 473,434 developers and data experts.

sub main was not found - solution for complete noobs

I downloaded VB.NET for the first time and chose to start a project based on Windows Forms for VB.
It opened a new project with a default Form1 for me. I tried to run it expecting to see a blank form show but instead I got the rror message "sub main was not found".
After searching wrong answers for ages I found out that it's due to 2 set up errors by Microsoft (surprise, surprise).
The first error is that when you click the green arrow to Run your project, THE DEFAULT thing to run is a Subroutine called Main. If that isn't found, it doesn't say, "I don't know what to run".
The second error is that it does not specify that the Form is the default thing to run.
To fix that you need to right-click your Solution (Project) and choose Properties.
In the new window that opens, click Application, then the listbox Startup Object and click your form name e.g. Form1
Now it will work.

May 11 '21 #1
0 3335

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

Similar topics

1
by: Sven Putze | last post by:
my target: I want to upload a file via HTTP Post and show the user a progress bar my 1st try: I´ve used WebClient.UploadFile and WebClient.UploadData, they work fine but I don't know any...
4
by: james margey | last post by:
Hi to all, I have spent 3 days at this error and i have two days to go for a deadline, and i am about to go off my nut, the reason being: Microsoft dont seem to be able to provide a solution, I...
6
by: John Doe | last post by:
Hi, I've got the following error when building my ASP.NET application called WebApplication1: Preparing resources... Updating references... Performing main compilation... error CS0006:...
6
by: Benny Raymond | last post by:
I was trying to break some of my sections of code up into seperate files using the new "partial" type definition and coudln't figure out how to make the new files appear under the main file... ...
6
by: Joe Jax | last post by:
I have an object that spawns a worker thread to process one of its methods. That method processes methods on a collection of other objects. During this processing, a user may request to cancel the...
2
by: Erwin Moller | last post by:
Hi Group, I cannot log errors for some reason. Situation: PHP 5.0 ISAPI on W2000 IIS 5.0 In php.ini: error_reporting = E_ALL log_errors = On
2
by: Bill nguyen | last post by:
I converted a VB.NET 2003 app to 2005. I got error "SUB MAIN" not found. Why 05 requires a Sub Main to run? I never used Sub Main in my apps. Thanks Bill
1
by: Carl Dreher | last post by:
I need to detect when the user clicks on a column header to resort the data in a DataGrid. I've added an event handler to my class, which is a form that hold the DataGrid: Private Sub...
2
by: IGM | last post by:
Hi how do I maximize IE when I start web project from Visual Studio?
0
by: Gerrit Horeis | last post by:
I found a Reason for this solution This error occurs because of installation of a IIS update (windows update). After installing the update the settings from the root IIS application was copied to...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...

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.