Archive

Archive for March, 2015

Running C#/.NET code from Cloud 9 IDE

March 16, 2015 Leave a comment

I was experimenting with Cloud 9 IDE mainly for remote coding interviews.

I also wanted to see if I could add C# support. C# syntax highlighting was already supported in Cloud 9. Mono is also pre installed in the Cloud 9 Environment.

All I had to do was add a custom runner to use mcs command line compiler for mono.

I am a complete newbie when it comes to ubuntu / bash etc., so please bear with if there are any script issues with the runner.

You can configure a custom runner using this json:

{
    "cmd" :  [
        "bash",
        "--login",
        "-c",
        "mcs '*.cs' -out:'$project_path$project_name.exe' $args;mono '$project_path$project_name.exe' $args"
    ],
    "info" : "Started $project_path$project_name",
    "env" : {},
    "selector" : "source.cs"
}
Categories: .NET Framework Tags: , , , ,