My favorites | Sign in
Project Logo
Project hosting will be READ-ONLY Wednesday at 8am PST due to brief network maintenance.
                
Search
for
Updated Feb 04 (5 days ago) by wildart
Labels: Featured, Phase-Deploy, Phase-Implementation
NAntFSharpTask  
How to use F# extension for NAnt

F# task extension for NAnt

Installation

There are several steps in installation process:

Note:
  1. Create script file named 'fsc' with following line 'mono /path/to/FSharp/compiler/fscp.exe $1'
  2. Copy this file to mono framework directory

Task Parameters

Attribute Type Description Required
output file The output file created by the compiler. True
target string Output type. Possible values are exe, winexe, dll or module. True
debug DebugOutput Specifies the type of debugging information generated by the compiler. False
define string Define conditional compilation symbol(s). False
doc file The name of the XML documentation file to generate. False
optimize bool Specifies whether the compiler should perform optimizations to the make output files smaller, faster, and more effecient. The default is false. Debug overrides optimization settings. False

Task Example

<fsc target="exe" output="HelloWorld.exe" debug="true">
<sources>
<include name="HelloWorld.fs">
</include>
</sources>

<references>
<include name="System.dll">
</include>
</references>

</fsc>

Notes

1) F# compiler has annoying problem - you have to order source files for compiler input in order to preserve dependency (more info). To avoid error related to reordering of source files, use asis="true" parameter in include element.

Example:

<sources>
<include name="source1.fs" asis="true">
</include>

<include name="source3.fs" asis="true">
</include>
<include name="main.fs" asis="true">
</include>

</sources>

this example will be converted in following pattern "source1.fs source3.fs main.fs"


Sign in to add a comment
Hosted by Google Code