Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I compile all files in a directory with mono?

Tags:

c#

mono

I want to compile a C# app with mono that consists of multiple files (all in 1 directory). What is the command that I need?

like image 415
NotDan Avatar asked Nov 25 '09 01:11

NotDan


3 Answers

Use:

gmcs -out:yourapp.exe -pkg:dotnet *.cs

or

gmcs -out:yourapp.exe -pkg:dotnet35 *.cs

Those commands will reference all the assemblies referenced by default in .NET.

like image 102
Gonzalo Avatar answered Nov 11 '22 03:11

Gonzalo


gmcs -target:exe -out:program.exe *.cs

like image 32
jstedfast Avatar answered Nov 11 '22 03:11

jstedfast


Looks like the only thing you need is the output file.

gmcs -out:bob.exe *.cs
like image 1
Milhous Avatar answered Nov 11 '22 05:11

Milhous