Building Extensions with NET SDK
How to build extensions for LANDIS-II using the .NET Framework Software Development Kit (SDK) and a command-line build tool.
Install the SDK
- Install LANDIS-II as described in the installation instructions.
- Download .NET Framework 2.0 SDK x86 from the Microsoft .NET Framework Developer Center. Run the setup program to install the SDK.
Once the SDK is installed, you can use the build tool of your choice (see below) from the SDK's command prompt.
Project Folder for New Extension
- Create a project folder for the extension somewhere on your computer. This folder will contain the source code files for the extension.
- Create the initial set of source files for the extension.
Two ways to do this are:
- Download the corresponding source-file template based
on the extension's type:
- Succession Extension (Template coming soon)
- Disturbance Extension
- Output Extension
- If the new extension is actually a new version of an existing extension (for example, the new extension is going to be version 1.1), copy the source files for the current version of the extension into the new project folder.
- Download the corresponding source-file template based
on the extension's type:
Build Tools
You have a choice of command-line build tools that you can use to build the new extension.
- MSBuild
- This build tool comes with the .NET Framework. Its
documentation is included in the SDK's documentation; just
search for MSBuild in the documentation index.
- A sample MSBuild project file
is available. Once a copy of this project file is placed
in the new extension's project folder, the extension can
be built by simply entering
msbuildat the SDK command prompt.
- A sample MSBuild project file
is available. Once a copy of this project file is placed
in the new extension's project folder, the extension can
be built by simply entering
- NMake
- If you have experience with Makefiles, Microsoft's version of the Make build tool, NMAKE, is also available with the SDK. Like MSBuild, the documentation for NMAKE is included in the SDK's documentation.
- NAnt (Our preferred tool)
- This build tool was inspired by the popular Java
build tool called Ant. NAnt is open source, so you can
get it for free from the
NAnt web site.
- Download the latest nightly build in order to ensure that NAnt includes support for the .NET Framework 2.0.
- After downloading the zip file, extract its contents
into a folder, for example,
C:\Program Files\NAnt. - Add the bin folder of this NAnt installation to your
PATH environment variable so that you can run the tool
by typing
nantat the SDK command prompt.
- Using NAnt with existing build files
- Within each source code bundle (or repository URL), there exist .build files. These files streamline compilation.
- Create a text file named FLEL.build. Within the text file, insert the following text:
<?xml version="1.0"?> <project name="My custom build settings"> <include buildfile="${edu.wisc.forest.flel.build}/Landis.build" /> </project> - Create a new folder called "config" in your "My Documents" folder. In this new "config" folder, save a copy of FLEL.build. FLEL.build instructs the FLEL build system to load additional settings and rules that are used to build LANDIS-II components (e.g., plug-ins).
- To compile, first type
nantat the SDK command prompt. Check for errors. Next, typenant install. If compiled successfully, the proper dll should be created along-side the Landis-II core dlls.
- Create a text file named FLEL.build. Within the text file, insert the following text:

