ctrl+shift+p filters: :st2 :st3 :win :osx :linux
Browse

C# Compile & Run

by chrokh ALL

Build and run single C# files from Sublime Text 2.

Details

  • 2016.10.18.09.30.03
  • github.​com
  • github.​com
  • 9 years ago
  • 1 hour ago
  • 12 years ago

Installs

  • Total 41K
  • Win 32K
  • Mac 5K
  • Linux 4K
May 21 May 20 May 19 May 18 May 17 May 16 May 15 May 14 May 13 May 12 May 11 May 10 May 9 May 8 May 7 May 6 May 5 May 4 May 3 May 2 May 1 Apr 30 Apr 29 Apr 28 Apr 27 Apr 26 Apr 25 Apr 24 Apr 23 Apr 22 Apr 21 Apr 20 Apr 19 Apr 18 Apr 17 Apr 16 Apr 15 Apr 14 Apr 13 Apr 12 Apr 11 Apr 10 Apr 9 Apr 8 Apr 7 Apr 6
Windows 0 6 1 3 0 1 2 4 2 1 0 1 4 2 3 2 3 1 2 7 0 2 0 4 2 0 1 0 2 2 1 4 1 2 0 1 3 1 4 2 1 3 2 1 4 1
Mac 0 0 0 0 0 0 0 2 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Linux 0 0 2 0 0 1 0 0 0 1 0 0 1 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 1 1 0 0 0 1 0 1 0 0 0 1 0 0 1 0 1
02468May 21May 18May 15May 12May 9May 6May 3Apr 30Apr 27Apr 24Apr 21Apr 18Apr 15Apr 12Apr 9Apr 6May 21 Linux: 0 Mac: 0 Windows: 0May 20 Linux: 0 Mac: 0 Windows: 6May 19 Linux: 2 Mac: 0 Windows: 1May 18 Linux: 0 Mac: 0 Windows: 3May 17 Linux: 0 Mac: 0 Windows: 0May 16 Linux: 1 Mac: 0 Windows: 1May 15 Linux: 0 Mac: 0 Windows: 2May 14 Linux: 0 Mac: 2 Windows: 4May 13 Linux: 0 Mac: 0 Windows: 2May 12 Linux: 1 Mac: 0 Windows: 1May 11 Linux: 0 Mac: 0 Windows: 0May 10 Linux: 0 Mac: 0 Windows: 1May 9 Linux: 1 Mac: 0 Windows: 4May 8 Linux: 0 Mac: 0 Windows: 2May 7 Linux: 0 Mac: 0 Windows: 3May 6 Linux: 0 Mac: 1 Windows: 2May 5 Linux: 0 Mac: 0 Windows: 3May 4 Linux: 0 Mac: 0 Windows: 1May 3 Linux: 0 Mac: 0 Windows: 2May 2 Linux: 1 Mac: 0 Windows: 7May 1 Linux: 0 Mac: 0 Windows: 0Apr 30 Linux: 0 Mac: 0 Windows: 2Apr 29 Linux: 0 Mac: 0 Windows: 0Apr 28 Linux: 0 Mac: 0 Windows: 4Apr 27 Linux: 0 Mac: 0 Windows: 2Apr 26 Linux: 0 Mac: 0 Windows: 0Apr 25 Linux: 0 Mac: 0 Windows: 1Apr 24 Linux: 0 Mac: 0 Windows: 0Apr 23 Linux: 0 Mac: 0 Windows: 2Apr 22 Linux: 1 Mac: 0 Windows: 2Apr 21 Linux: 1 Mac: 0 Windows: 1Apr 20 Linux: 0 Mac: 0 Windows: 4Apr 19 Linux: 0 Mac: 0 Windows: 1Apr 18 Linux: 0 Mac: 0 Windows: 2Apr 17 Linux: 1 Mac: 0 Windows: 0Apr 16 Linux: 0 Mac: 0 Windows: 1Apr 15 Linux: 1 Mac: 0 Windows: 3Apr 14 Linux: 0 Mac: 0 Windows: 1Apr 13 Linux: 0 Mac: 0 Windows: 4Apr 12 Linux: 0 Mac: 0 Windows: 2Apr 11 Linux: 1 Mac: 0 Windows: 1Apr 10 Linux: 0 Mac: 0 Windows: 3Apr 9 Linux: 0 Mac: 0 Windows: 2Apr 8 Linux: 1 Mac: 0 Windows: 1Apr 7 Linux: 0 Mac: 0 Windows: 4Apr 6 Linux: 1 Mac: 0 Windows: 1May 21 Linux: 0 Mac: 0 Windows: 0May 20 Linux: 0 Mac: 0 Windows: 6May 19 Linux: 2 Mac: 0 Windows: 1May 18 Linux: 0 Mac: 0 Windows: 3May 17 Linux: 0 Mac: 0 Windows: 0May 16 Linux: 1 Mac: 0 Windows: 1May 15 Linux: 0 Mac: 0 Windows: 2May 14 Linux: 0 Mac: 2 Windows: 4May 13 Linux: 0 Mac: 0 Windows: 2May 12 Linux: 1 Mac: 0 Windows: 1May 11 Linux: 0 Mac: 0 Windows: 0May 10 Linux: 0 Mac: 0 Windows: 1May 9 Linux: 1 Mac: 0 Windows: 4May 8 Linux: 0 Mac: 0 Windows: 2May 7 Linux: 0 Mac: 0 Windows: 3May 6 Linux: 0 Mac: 1 Windows: 2May 5 Linux: 0 Mac: 0 Windows: 3May 4 Linux: 0 Mac: 0 Windows: 1May 3 Linux: 0 Mac: 0 Windows: 2May 2 Linux: 1 Mac: 0 Windows: 7May 1 Linux: 0 Mac: 0 Windows: 0Apr 30 Linux: 0 Mac: 0 Windows: 2Apr 29 Linux: 0 Mac: 0 Windows: 0Apr 28 Linux: 0 Mac: 0 Windows: 4Apr 27 Linux: 0 Mac: 0 Windows: 2Apr 26 Linux: 0 Mac: 0 Windows: 0Apr 25 Linux: 0 Mac: 0 Windows: 1Apr 24 Linux: 0 Mac: 0 Windows: 0Apr 23 Linux: 0 Mac: 0 Windows: 2Apr 22 Linux: 1 Mac: 0 Windows: 2Apr 21 Linux: 1 Mac: 0 Windows: 1Apr 20 Linux: 0 Mac: 0 Windows: 4Apr 19 Linux: 0 Mac: 0 Windows: 1Apr 18 Linux: 0 Mac: 0 Windows: 2Apr 17 Linux: 1 Mac: 0 Windows: 0Apr 16 Linux: 0 Mac: 0 Windows: 1Apr 15 Linux: 1 Mac: 0 Windows: 3Apr 14 Linux: 0 Mac: 0 Windows: 1Apr 13 Linux: 0 Mac: 0 Windows: 4Apr 12 Linux: 0 Mac: 0 Windows: 2Apr 11 Linux: 1 Mac: 0 Windows: 1Apr 10 Linux: 0 Mac: 0 Windows: 3Apr 9 Linux: 0 Mac: 0 Windows: 2Apr 8 Linux: 1 Mac: 0 Windows: 1Apr 7 Linux: 0 Mac: 0 Windows: 4Apr 6 Linux: 1 Mac: 0 Windows: 1May 21 Linux: 0 Mac: 0 Windows: 0May 20 Linux: 0 Mac: 0 Windows: 6May 19 Linux: 2 Mac: 0 Windows: 1May 18 Linux: 0 Mac: 0 Windows: 3May 17 Linux: 0 Mac: 0 Windows: 0May 16 Linux: 1 Mac: 0 Windows: 1May 15 Linux: 0 Mac: 0 Windows: 2May 14 Linux: 0 Mac: 2 Windows: 4May 13 Linux: 0 Mac: 0 Windows: 2May 12 Linux: 1 Mac: 0 Windows: 1May 11 Linux: 0 Mac: 0 Windows: 0May 10 Linux: 0 Mac: 0 Windows: 1May 9 Linux: 1 Mac: 0 Windows: 4May 8 Linux: 0 Mac: 0 Windows: 2May 7 Linux: 0 Mac: 0 Windows: 3May 6 Linux: 0 Mac: 1 Windows: 2May 5 Linux: 0 Mac: 0 Windows: 3May 4 Linux: 0 Mac: 0 Windows: 1May 3 Linux: 0 Mac: 0 Windows: 2May 2 Linux: 1 Mac: 0 Windows: 7May 1 Linux: 0 Mac: 0 Windows: 0Apr 30 Linux: 0 Mac: 0 Windows: 2Apr 29 Linux: 0 Mac: 0 Windows: 0Apr 28 Linux: 0 Mac: 0 Windows: 4Apr 27 Linux: 0 Mac: 0 Windows: 2Apr 26 Linux: 0 Mac: 0 Windows: 0Apr 25 Linux: 0 Mac: 0 Windows: 1Apr 24 Linux: 0 Mac: 0 Windows: 0Apr 23 Linux: 0 Mac: 0 Windows: 2Apr 22 Linux: 1 Mac: 0 Windows: 2Apr 21 Linux: 1 Mac: 0 Windows: 1Apr 20 Linux: 0 Mac: 0 Windows: 4Apr 19 Linux: 0 Mac: 0 Windows: 1Apr 18 Linux: 0 Mac: 0 Windows: 2Apr 17 Linux: 1 Mac: 0 Windows: 0Apr 16 Linux: 0 Mac: 0 Windows: 1Apr 15 Linux: 1 Mac: 0 Windows: 3Apr 14 Linux: 0 Mac: 0 Windows: 1Apr 13 Linux: 0 Mac: 0 Windows: 4Apr 12 Linux: 0 Mac: 0 Windows: 2Apr 11 Linux: 1 Mac: 0 Windows: 1Apr 10 Linux: 0 Mac: 0 Windows: 3Apr 9 Linux: 0 Mac: 0 Windows: 2Apr 8 Linux: 1 Mac: 0 Windows: 1Apr 7 Linux: 0 Mac: 0 Windows: 4Apr 6 Linux: 1 Mac: 0 Windows: 1

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 and mono commands available in your PATH. For Windows you should have csc 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 here

  • SublimeFixMacPath (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

  1. cd ~/Library/Application\ Support/Sublime\ Text\ 2/Packages/
  2. 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");
  }
}