Version 3 (modified by Charles, 14 years ago) |
---|
MsxBuild
Microsoft .NET comes with a build tool called "msbuild" which Novell Mono calls "xbuild". This document will use the name "msbuild" henceforth, but will be referring to both of them as they take the same input files and produce the same results.
Example
<Project DefaultTargets="Compile" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <!-- to-do: provide a sample for Cobra --> </Project>
Then at the command line, a simple "msbuild" (or "xbuild" on Mono) will pick the lone *.proj file and build its default target:
msbuild
If there is more than one .proj file, you can pass it on the command line:
msbuild foo.proj
To build a specific target:
msbuild /t:test
Targets are case insensitive.
Notes
You don't need to use a build tool for single files or very small projects.
You can embed library references in your Cobra source code with the RefDirective? (@ref) and thereby skip passing them on the command line.
Alternatives to msbuild/xbuild include Nant, Make and scripts (such as bash or .bat).