Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
A simple C# builder for Sublime Text 2. Accompanying C# builder definition here:
:: Assumptions:
:: - Sublime Text has set the working directory and both the source and executable files
:: are in that directory
:: - The script is only capable of handling simple C# apps that do not reference 3rd-party
:: libraries
:: Inputs from Sublime Text
:: %1 - The full path and filename of the source file to build
:: %2 - The name of the executable file
:: Set up build environment. Change this as necessary depending on the version
:: of Visual Studio you wish to use.
@CALL "%VS90COMNTOOLS%vsvars32.bat"
csc %SRC_FILE% /nologo /debug:full /platform:x86
@IF errorlevel 1 GOTO end
:: Execute compiled binary if build was successful.
@ECHO Executing %EXE_NAME%:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment