Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

While using the application CodeRunner with C#, whenever I try to "run" the program it gives me this error:

bash: Run Command: No such file or directory.

How can I resolve this?

share|improve this question

closed as off topic by MrDaniel, CajunLuke, gentmatt, jmlumpkin, Mark Oct 9 '12 at 8:33

Questions on Ask Different are expected to relate to Apple hardware or software within the scope defined by the community. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about reopening questions here.If this question can be reworded to fit the rules in the help center, please edit the question.

1  
Welcome to Ask Different! You had two questions in here. This site works better when there is only one question per question. That way, it's easier for other people to find solutions if they have the same problem. I've edited out your second question, but feel free to ask it separately. Just keep in mind that this site isn't about programming. Please take a look at the FAQs for more info. Thanks. –  Nathan Greenstein Sep 25 '12 at 0:28
add comment

2 Answers 2

Have you installed Mono and added the configuration to CodeRunner to enable C# support?

I found a solution if you have installed Mono over at MacRumors forums posted by user David Sheeks outlined below:

Configure CodeRunner

Open the CodeRunner Preferences dialog, go to the "Languages" tab, click the "+" icon and and specify "C#" as the Language name.

On the right you have fields where you can populate the language settings. Check the "Language uses compilation script" check box, enter /usr/bin/mono $compiler for the Run Command and set the File Extension to cs

Click the "Edit Script..." button and append the following to the compile.sh script (this will open in the CodeRunner editor):

file=$1
/usr/bin/mcs "$file"
status=$?
if [ $status -ne 0 ]
then
exit $status
fi
echo $file | sed -e "s/\.cs/.exe/"
exit 0

Mono installs it's compiler and runtime executable in /usr/bin and this is verified with the current version of the Mono SDK.

If you have done part of the above, and not setup the path's correctly, I would assume that the missing path it's complaining about is the fact that you either a) haven't installed Mono and the config can't find the compiler or b) youve installed Mono and the config in CodeRunner is invalid.

share|improve this answer
add comment

I'm pretty sure there isn't a C# compiler for Mac OS X. C# is from Microsoft and is Windows only.

share|improve this answer
    
And it doesn't appear that the app supports C# either. –  Nathan Greenstein Sep 25 '12 at 2:08
    
No, but I believe that app is extensible and you can add other languages that it doesn't support You just have to write the scripts yourself, but there are examples for all of the pre-installed languages. –  Mark Sep 25 '12 at 2:11
4  
C# on Mac exists in the form of Mono. It works; I program Unity3d games in it, and others use it without Unity3d. –  laaph Sep 25 '12 at 5:59
    
Thanks, Good to know. I've been a bit too Apple centered since about 1982 to know the whole story about a Windows. –  Mark Sep 25 '12 at 13:13
add comment

Not the answer you're looking for? Browse other questions tagged or ask your own question.