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# Basics (Retired) Console I/O Start Coding

Robin Marshall
Robin Marshall
82 Points

Command not found,

ive tried using mcs,program.cs and mono Program.exe both return the same result, it says command not found, ive also saved my work and it still wont run

https://w.trhou.se/rqo3lohpld

Simon McGuirk
Simon McGuirk
2,673 Points

Just checking are you using mcs Program.cs to compile? I believe the command is case sensitive so you'll need to type the name of the file exactly.

1 Answer

Simon Coates
Simon Coates
28,694 Points

i forked your workspace, made a change or two to get it to compile:

class Program
{
    static void Main()
    {
         // Prompt user for minutes excersized
         System.Console.WriteLine("Enter how many minutes you exercised: ");
       // Add minutes excersized to total
       // Display total exersized to screen
       // Repeat until user quits

    } 
} 

and then got

treehouse:~/workspace$ mcs Program.cs                
treehouse:~/workspace$ mono Program.exe                                                    
Enter how many minutes you exercised:                                                      
treehouse:~/workspace$