-
Notifications
You must be signed in to change notification settings - Fork 64
Run the C# compiler directly, to compile your code and build your projects.
desc "Manually compile this project"
csc :build do |cmd|
cmd.compile = ["file1", "file2", ..., "fileN"]
cmd.out = "path/to/output/target"
cmd.target = :library
cmd.debug
cmd.define = [:foo, :bar]
cmd.doc = "path/to/docfile"
cmd.optimize
end
An array of files to compile.
compile = ["file1", "file2"]
The file to output, including extension: exe
or dll
.
out = "path/to/output/target"
The type of output to create: exe
, winexe
, library
, module
, appcontainerexe
, winmdobj
.
target = :library
An array of .NET assemblies to reference.
references = ["System.Path", "System.IO"]
An array of resources to embed into the output.
resources = ["foo.cs", "bar.cs"]
The resources can be specified with Rake's built in FileList
, making it easy to use patterns to include or exclude specific files.
resources = FileList["**/*.cs"].exclude("test/")
Enable debug output, optionally, at a certain level: :full
or :pdbonly
debug
or
debug :full
Define compiler constants.
define = [:foo, :bar]
Produce XML documentation at this location.
doc = "path/to/docfile"
Turn on compiler optimizations.
optimize
The assembly is not fully signed when created.
delay_sign
The type that contains the entry point.
main = "HelloWorld"
The key file and container.
key_file = "path/to/keyfile"
key_container = "KeyContainer"
Hide the startup banner and logo.
no_logo
(none)