7 | | to-do: provide a sample for Cobra |
| 7 | {{{ |
| 8 | #!xml |
| 9 | <Project DefaultTargets="Compile" |
| 10 | xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> |
| 11 | |
| 12 | <!-- to-do: provide a sample for Cobra --> |
| 13 | |
| 14 | </Project> |
| 15 | }}} |
| 16 | |
| 17 | Then at the command line, a simple "msbuild" (or "xbuild" on Mono) will pick the lone *.proj file and build its default target: |
| 18 | {{{ |
| 19 | msbuild |
| 20 | }}} |
| 21 | |
| 22 | If there is more than one .proj file, you can pass it on the command line: |
| 23 | {{{ |
| 24 | msbuild foo.proj |
| 25 | }}} |
| 26 | |
| 27 | To build a specific target: |
| 28 | {{{ |
| 29 | msbuild /t:test |
| 30 | }}} |
| 31 | Targets are case insensitive. |
| 32 | |
| 33 | |
| 34 | == Notes == |
| 35 | |
| 36 | You don't need to use a build tool for single files or very small projects. |
| 37 | |
| 38 | You can embed library references in your Cobra source code with the RefDirective (@ref) and thereby skip passing them on the command line. |
| 39 | |
| 40 | Alternatives to msbuild/xbuild include Nant, Make and scripts (such as bash or .bat). |
| 41 | |