Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialSky Dagan
2,636 PointsCan't compile my code, why?
this is my code --> http://screencast.com/t/38FlA7DK4Q
when I try to compile it I get:
treehouse:~/workspace$ mcs Workout.cs
error CS5001: Program Workout.exe' does not contain a static
Main' method suitable for an entry
point
Compilation failed: 1 error(s), 0 warnings
2 Answers
Steven Parker
231,269 PointsI think Jennifer spotted the problem. You didn't save your edits yet, so the compiler is working with incomplete or empty source files.
Sky Dagan
2,636 PointsOops. Already understood it ^^
Thank you :)
Jennifer Nordell
Treehouse TeacherJennifer Nordell
Treehouse TeacherSky Dagan It's hard to know for sure with just a screenshot. I don't see anything blatantly wrong with the code that would cause it not to compile. However, from your screenshot what I can say is that neither of those files had their changes saved before compiling (as indicated by the orange dots on the tabs).