Posted on 2006-04-21
Last Modified: 2010-04-16
Dear Experts,

This is a humiliating question to have to post in public, but:

In VS2005, I have my first test project, and I just want to run it.  However, the only "run-type" option I can find is "debug", which just gives me some warnings.

The project currently consists of two classes.  One is basically a suite of utility methods, and the other does nothing but call one of those methods, for testing purposes.  The Main method is, obviously, in the latter.  

When (out of ignorance and desperation) I hit the green triangular "debug" button, it next goes to a warning in one of the utility methods that I am NOT calling.

I had been able to run a "hello, world" class, but now I'm not sure if I used "debug" to do it...

How do I just say "Run, starting with Main"?

Humiliatingly Yours,
Question by:BrianMc1958
    LVL 69

    Accepted Solution

    Hi BrianMc1958,

    Check your project properties for the startup object.


    Author Comment

    OK.  It says "not set" and the whole page is grayed out.  What did I do wrong?  I TRYING to be a GOOD PERSON!
    LVL 96

    Expert Comment

    by:Bob Learned

    When you created your project, what project type did you select?

    LVL 69

    Expert Comment

    by:Éric Moreau
    It needs to be set to the class you want it to start first

    Author Comment

    To TheLearnedOne:  Uh, I was afraid you'd ask that.  I don't recall exactly.  I remember there was an option for something like "library / applet", which I didn't take.  I think I took the default, and I think that was something like "Windows Application".

    --The UnLearnedOne

    Author Comment

    To emoreua:  When I go to Project > Properties, the "startup object" is "not set".  I assume I'm supposed to enter the name of the class containing my "Main" method.  But the whole page is grayed out.

    Again, I'm a total newbie at VS2005 (or VSAnything), so I'm sure I'm missing something obvious...

    Author Comment

    Sorry.  I guess I was still in "debug mode".  I hit "stop", and then I could enter the name of my Main class.  Now VS2005 itself is crashing when I try to run.  Is that progress?  I'm not sure.

    Thanks to both of you for your help.


    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How your wiki can always stay up-to-date

    Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
    - Increase transparency
    - Onboard new hires faster
    - Access from mobile/offline

    Introduction Although it is an old technology, serial ports are still being used by many hardware manufacturers. If you develop applications in C#, Microsoft .NET framework has SerialPort class to communicate with the serial ports.  I needed to…
    Entity Framework is a powerful tool to help you interact with the DataBase but still doesn't help much when we have a Stored Procedure that returns more than one resultset. The solution takes some of out-of-the-box thinking; read on!
    Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…
    Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

    760 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    12 Experts available now in Live!

    Get 1:1 Help Now