Last active
May 5, 2017 14:56
-
-
Save asaskevich/9468158 to your computer and use it in GitHub Desktop.
Compile and run C# app from command line
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
:: Making directory for executable files | |
md build | |
set /p fName=Write source name: | |
:: Csharp compiler must be in %PATH% | |
csc.exe %fName%.cs | |
:: Move executable file to directory | |
move %fName%.exe build/ | |
cd build | |
cls | |
:: Run compiled file | |
echo Starting %fName%.exe ... | |
echo. | |
echo. | |
echo. | |
call %fName%.exe | |
pause |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment