Boo Compiler Options

There are lots of options for building Boo.

I got fed up having to look up the options so I have them all here.

Usage is: booc [options] file1 …
 -c:CULTURE           Sets the UI culture to be CULTURE
 -debug[+|-]          Generate debugging information (default: +)
 -define:S1[,Sn]      Defines symbols S1..Sn with optional values (=val) (-d:)
 -delaysign           Delays assembly signing
 -ducky               Turns on duck typing by default
 -checked[+|-]        Turns on or off checked operations (default: +)
 -embedres:FILE[,ID]  Embeds FILE with the optional ID
 -lib:DIRS            Adds the comma-separated DIRS to the assembly search path
 -noconfig            Does not load the standard configuration
 -nostdlib            Does not reference any of the default libraries
 -nologo              Does not display the compiler logo
 -p:PIPELINE          Sets the pipeline to PIPELINE
 -o:FILE              Sets the output file name to FILE
 -keyfile:FILE        The strongname key file used to strongname the assembly
 -keycontainer:NAME   The key pair container used to strongname the assembly
 -reference:ASS       References the specified assembly (-r:ASS)
 -srcdir:DIR          Adds DIR as a directory where sources can be found
 -target:TYPE         Sets the target type (exe, library or winexe)
 -resource:FILE[,ID]  Embeds FILE as a resource
 -pkg:P1[,Pn]         References packages P1..Pn (on supported platforms)
 -utf8                Source file(s) are in utf8 format
 -v, -vv, -vvv        Sets verbosity level from warnings to very detailed
 -wsa                 Enables white-space-agnostic build

Direct compile line:

booc -t:library

booc -r:PresentationCore.dll -r:PresentationFramework.dll -r:WindowsBase.dll

Note you can supply multiple boo source files to split the project.

Nant build script:

<?xml version=”1.0″ ?>
<project name=”wpfdemo” default=”build”>
<property name=”boo.dir” value=”C:/boo/bin” />
    <target name=”build” depends=”wpfdemo” />
    <target name=”wpfdemo”>
        <loadtasks assembly=”${boo.dir}/Boo.NAnt.Tasks.dll” />
                 <booc output=”wpfdemo.exe” target=”winexe”>
                <include name=”C:/Program Files/Reference Assemblies/Microsoft/Framework/v3.0/*.dll” />
                <include name=”” />

You can also use msbuild:

<Project DefaultTargets=”Build” xmlns=”″&gt;
    <Configuration Condition=” ‘$(Configuration)’ == ” “>Debug</Configuration>
    <Platform Condition=” ‘$(Platform)’ == ” “>AnyCPU</Platform>
  <PropertyGroup Condition=” ‘$(Configuration)’ == ‘Debug’ “>
  <PropertyGroup Condition=” ‘$(Configuration)’ == ‘Release’ “>
    <Compile Include=”” />
    <Content Include=”example.boobs” />
    <ProjectReference Include=”..bake.engineBake.Engine.booproj”>
  <Import Project=”$(BooBinPath)Boo.Microsoft.Build.targets” />


import Bake.IO.Extensions

Task(“default”, [“test”])

Task(“compile”, [“codeGen”]) do:
    print “> do compile stuff”

Task(“dataLoad”, [“codeGen”]) do:
    print “> do dataLoad stuff”

Task(“codeGen”) do:
    print “> do codeGen stuff”

Task(“test”, [“compile”, “dataLoad”]) do:
    print “> do test stuff”
    print Configuration.test

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s