-
Notifications
You must be signed in to change notification settings - Fork 63
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
endAn 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 = :libraryAn 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
debugor
debug :fullDefine compiler constants.
define = [:foo, :bar]Produce XML documentation at this location.
doc = "path/to/docfile"Turn on compiler optimizations.
optimizeThe assembly is not fully signed when created.
delay_signThe 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)