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 trial

C# C# Objects Object-Oriented Programming Fields

Compiller error??

In Workspaces i hav this error. ?

Defense.Game.Main()'
Path.cs(6,24): error CS0017: Program Game.exe' has more than one entry point defined:Treehouse Defense.Path.Main()'
Game.cs(5,28): error CS0017: Program Game.exe' has more than one entry point defined:Treehouse Defense.Game.Main()'
Tower.cs(6,24): error CS0017: Program Game.exe' has more than one entry point defined:Treehous eDefense.Tower.Main()'
Compilation failed: 6 error(s), 0 warnings
treehouse:~/workspace

2 Answers

Steven Parker
Steven Parker
231,271 Points

It looks like you have more than one Main method.

If I'm interpreting the error messages correctly, you have a Main method in Path.cs, Game.cs, and Tower.cs. There can only be one for the program, probably the one in Game.cs.

For further questions, or if this isn't enough to resolve your issue now, please make a snapshot of your workspace and post the link to it here to enable a complete analysis.

Thanks .... AGAIN Steven. I had a "Main method" ( public static void Main() )in all of dem. I will try to make a snapshot next time.