C# Compile & Run
Build and run single C# files from Sublime Text 2.
Details
Installs
- Total 41K
- Win 32K
- Mac 5K
- Linux 4K
Oct 6 | Oct 5 | Oct 4 | Oct 3 | Oct 2 | Oct 1 | Sep 30 | Sep 29 | Sep 28 | Sep 27 | Sep 26 | Sep 25 | Sep 24 | Sep 23 | Sep 22 | Sep 21 | Sep 20 | Sep 19 | Sep 18 | Sep 17 | Sep 16 | Sep 15 | Sep 14 | Sep 13 | Sep 12 | Sep 11 | Sep 10 | Sep 9 | Sep 8 | Sep 7 | Sep 6 | Sep 5 | Sep 4 | Sep 3 | Sep 2 | Sep 1 | Aug 31 | Aug 30 | Aug 29 | Aug 28 | Aug 27 | Aug 26 | Aug 25 | Aug 24 | Aug 23 | Aug 22 | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Windows | 0 | 2 | 0 | 0 | 1 | 3 | 5 | 5 | 2 | 3 | 2 | 3 | 4 | 13 | 3 | 1 | 3 | 4 | 2 | 3 | 2 | 2 | 1 | 2 | 2 | 4 | 1 | 2 | 0 | 3 | 0 | 2 | 3 | 2 | 3 | 0 | 2 | 2 | 4 | 4 | 3 | 2 | 1 | 3 | 2 | 1 |
Mac | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 1 | 1 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 1 | 2 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 1 | 0 | 1 |
Linux | 0 | 0 | 0 | 1 | 0 | 0 | 1 | 1 | 0 | 1 | 0 | 0 | 0 | 1 | 1 | 2 | 1 | 2 | 0 | 1 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 2 | 0 | 0 | 0 | 0 | 2 | 1 | 1 | 0 | 0 | 1 | 1 | 0 | 0 |
Readme
- Source
- raw.githubusercontent.com
Build and run single C# files from Sublime Text 2 on OSX and Windows.
Usage
With any *.cs file open.
- Cmd + b
Compile filename.cs into filename.exe in current folder and output errors
- Shift + Cmd + b
Run filename.exe in current folder
About
The aim of this plugin is to provide easy and fast and overhead-free access to the C# language. Without having to load heavy applications such as Visual Studio or Xamarin. This plugin provides a C# sandbox (usable for schools or other learning environments) and is not intended to be used to build production applications.
Dependencies
Assumes you have
mcs
andmono
commands available in your PATH. For Windows you should havecsc
in your PATH. If you have previously installed Xamarin Studio or Mono Develop you should have these available in your path. If you don't please read more at here or hereSublimeFixMacPath (for Mac users) . Required because of updates to Mac OS. Enables Sublime to load your PATH variable.
Installation
Using Package Manager (recommended)
You can now install the C# build system through the package manager channel. The package is called “C# Compile & Run”
The old-school way
cd ~/Library/Application\ Support/Sublime\ Text\ 2/Packages/
git clone git@github.com:ChrOkh/chsharp-build-singlefile-sublime-text-2.git CSharpSinglefile
Code-completion
If you want Visual Studio-style code completion, be sure to also install the awesome plugin CompleteSharp (available via package manager)
Example
Now we can write minimalistic C# console applications:
using System;
class MainClass{
public static void Main(){
Console.WriteLine("Hello world");
}
}