error CS5001: does not have an entry point defined

Hello all,

i keep getting the following when tryong to build a c# project.

error CS5001: Program 'C:\Inetpub\wwwroot\mysite\obj\Debug\mysite.exe' does not have an entry point defined

Can you help?
billy_boyAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

gripeCommented:
You need to declare a Main method in one of your classes.
0
gripeCommented:
See the following for an explanation:

http://www.csharphelp.com/archives/archive273.html
0
JigitCommented:
billy_boy, it seems that you are building a ASP.NET application in C#. Am I right?
If so, ASP.NET application should not have Main method. Set project type to Web Application in Project properties and select a web page as Start Page using right click on desired page.

HTH,
Jigit
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Cloud Class® Course: Ruby Fundamentals

This course will introduce you to Ruby, as well as teach you about classes, methods, variables, data structures, loops, enumerable methods, and finishing touches.

billy_boyAuthor Commented:
your right jigit, but how do you change the project type to c#.net web app?
0
tomvergoteCommented:
right click on your project in the solution explorer, pick properties and change the output type you see there
0
JigitCommented:
billy_boy, thanks for accepting my answer. May I ask why only B grade? You can fiil feedback on my answer and express your thoughts. Thanks!
0
billy_boyAuthor Commented:
sorry mate it was late and I've been working like a dog!...i couldnt work out how to change the prject properties to a C# application, so I started again and rebuilt.....is there an easier way?
0
tomvergoteCommented:
Comment from tomvergote
Date: 11/25/2004 07:34AM PST

right click on your project in the solution explorer, pick properties and change the output type you see there

:)
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
C#

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.