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 trialMark Wilkowske
Courses Plus Student 18,131 PointsC# Workspace not working I'm getting this error persistently. (1,12): error CS1525: Unexp
https://w.trhou.se/089g4b20k8 - look in Program.cs
I'm getting this persistent error.
(1,12): error CS1525: Unexpected symbol .', expecting
,', ;', or
='
For troubleshooting I tried removing whatever is at line 1 - using System; and the namespace for example - and still get the error. In my text editor I tried showing all visible characters and didn't see anything weird. Thanks for you help!
3 Answers
Steven Parker
231,248 PointsI forked your workspace snapshot, and your program compiled — and ran — with no errors.
Are you sure you made this snapshot after you started seeing the errors?
Otherwise, the only think I can think of to do is save your code, delete the workspace, re-create the workspace, then replace your code and recompile.
Mark Wilkowske
Courses Plus Student 18,131 PointsThank you Steve - I was running the code from the REPL and not the command line.
Arthur Bridgeman
2,734 PointsI had this same problem and could not figure out what I did wrong. Trouble shoot: Check that your Program.cs file is 'Saved' and that the edit dot is not showing. Also, Do not use the 'csharp' command to get the REPL activated. Make sure that if you have REPL activated through the csharp command to 'quit' first, then after treehouse:~/wokspace$ type mcs Program.cs && mono Program.exe then hit enter