I am using CodeRunner 2 (2.0.3) and I can not compile code in C#. I get the warning:
/Users/Username/Library/Application Support/CodeRunner/Languages/C#.crLanguage/Scripts/compile.sh: line 25: gmcs: command not found
In order to run C# code, you need to have Mono installed. You can get it at http://mono-project.com
I installed Mono, I installed Xamarin Studio and tried it through that as well. Some basic things work so I know Mono is there. I have restarted my computer, restarted CodeRunner, etc. I have done a few things in other StackOverflow answers and still doesn't work. I am attempting to run a simple URL request from THIS example. Any help is appreciated.
Thank you in advance!
~ SOLVED ~ Thank you @clay-fowler
1. Open CodeRunner
2. Set language to C#
3. Paste in:
using System;
class Untitled
{
static void Main(string[] args)
{
Console.Write ("Hello");
}
}
4. Go to CodeRunner -> Preferences -> Languages -> C#
5. Under the Settings tab, click Edit Script...
6. Change gmcs to mcs (line 25)
7. Should now look like:
compname=`echo "$CR_FILENAME" | sed 's/\(.*\)\..*/\1/'`.exe
mcs "$CR_FILENAME" "${@:1}"
status=$?
if [ $status -eq 0 ]
then
echo $compname
exit 0
elif [ $status -eq 127 ]
then
echo -e "\nIn order to run C# code, you need to have Mono installed. You can get it at http://mono-project.com"
fi
exit $status
8. Run the program