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#

Karen DuVall
Karen DuVall
537 Points

REPL is not working. Keep getting syntax error message.

Can anyone help with this? The REPL does not run in the console for me. I type csharp> and try to use it, but I get "bash: syntax error near unexpected token '('" (when I try to run anything that has parameters.)

I have no idea why but it seems like the console just doesn't run REPL when I try to open it.

4 Answers

Steven Parker
Steven Parker
231,109 Points

If you get an error message starting with "bash: ...", then you're not running the REPL — "bash" is the name of the system command shell.

Whatever you did before the line that got that error must have caused the REPL to exit. Or perhaps it wasn't started yet and you were entering commands to the shell.

Karen DuVall
Karen DuVall
537 Points

I'm starting without having run anything. I open workspaces completely fresh. I've even created new, completely blank, program files just to see if I could get the REPL to run, and I still get the same error message.

Steven Parker
Steven Parker
231,109 Points

To run the REPL, type "csharp" (not "csharp>").

Karen DuVall
Karen DuVall
537 Points

Ohhh gotcha. Ok. Why do the videos have "csharp>?"

Steven Parker
Steven Parker
231,109 Points

That's not what you type, it's the prompt from the REPL while you are running it.

Karen DuVall
Karen DuVall
537 Points

Okay, awesome. Thanks!