Simple C# Command-Line Compiles

by fwhagen Tue, 29 September 2009

In the category of “So I don’t forget again”, here is how to compile a simple code.cs file to a console executable:

csc /t:exe NetDir.cs

Very simple, very easy.  To make it a Windows exe (console app with no console window, very useful for scheduled or batch processing), change the target (/t == /target) to winexe.

Keywords:

Filed Under: .NET

Add comment

  Country flag

biuquote
  • Comment
  • Preview
Loading

TextBox

RecentPosts