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#

Rowen Coss
Rowen Coss
1,369 Points

Is there any faster way to Compile and run the new code we are adding?

I feel like typing "mcs -out:TreehouseDefense.exe *.cs && mono TreehouseDefense.exe" takes too long if I am going to be following this course in Workspaces and adding all the code. I tried copying it, but you can't even paste in the bottom window. any help?

1 Answer

Steven Parker
Steven Parker
231,198 Points

The console has the ability to create command aliases, so if you enter this just once:

alias run="mcs -out:TreehouseDefense.exe *.cs && mono TreehouseDefense.exe"

...then you can build/run throughout the remainder of the session by just typing run.