source: other-projects/trunk/realistic-books/packages/AntInstaller/web/manual1.7.0/manual/OptionalTasks/vbc.html@ 19253

Last change on this file since 19253 was 19253, checked in by davidb, 15 years ago

Establishing a source code repository for Veronica's Realistic Book's software

File size: 21.5 KB
Line 
1<!--
2 Licensed to the Apache Software Foundation (ASF) under one or more
3 contributor license agreements. See the NOTICE file distributed with
4 this work for additional information regarding copyright ownership.
5 The ASF licenses this file to You under the Apache License, Version 2.0
6 (the "License"); you may not use this file except in compliance with
7 the License. You may obtain a copy of the License at
8
9 http://www.apache.org/licenses/LICENSE-2.0
10
11 Unless required by applicable law or agreed to in writing, software
12 distributed under the License is distributed on an "AS IS" BASIS,
13 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 See the License for the specific language governing permissions and
15 limitations under the License.
16-->
17
18<html>
19<head>
20 <meta http-equiv="Content-Language" content="en-us">
21 <title>Vbc
22 Task</title>
23</head>
24
25<body bgcolor="#ffffff" text="#000000" link="#525D76"
26 alink="#525D76" vlink="#525D76">
27
28<table border="0" width="100%" cellspacing="4">
29
30 <!-- PAGE HEADER -->
31 <tr>
32 <td>
33 <table border="0" width="100%"><tr>
34 <td valign="bottom">
35 <font size="+3" face="arial,helvetica,sanserif"><strong>Vbc
36 Task</strong></font>
37 <br><font face="arial,helvetica,sanserif">This task compiles Visual Basic.NET source into executables or modules. <p>For historical reasons the pattern <code>**/*.vb</code> is preset as includes list and you can not override it with an explicit includes attribute. Use nested <code>&lt;src&gt;</code> elements instead of the basedir attribute if you need more control.</p></font>
38 </td>
39 <td>
40 <!-- PROJECT LOGO -->
41 <a href="http://ant.apache.org/">
42 <img src="../../images/ant_logo_large.gif" align="right" alt="Apache Ant" border="0">
43 </a>
44 </td>
45 </tr></table>
46 </td>
47 </tr>
48
49 <!-- START RIGHT SIDE MAIN BODY -->
50 <tr>
51 <td valign="top" align="left">
52
53 <!-- Applying task/long-description -->
54 <!-- Start Description -->
55 <table border="0" cellspacing="0" cellpadding="2" width="100%">
56 <tr><td>&nbsp;</td></tr>
57
58 <tr><td bgcolor="#525D76">
59 <font color="#ffffff" face="arial,helvetica.sanserif">
60 <a name="description">
61 <strong>Description</strong></a></font>
62 </td></tr>
63
64 <tr><td><blockquote>
65 This task compiles Visual Basic.NET source into executables or modules. The task requires vbc.exe on the execute path, unless it or an equivalent program is specified in the <tt>executable</tt> parameter <p> All parameters are optional: <code>&lt;vbc/&gt;</code> should suffice to produce a debug build of all *.vb files. <p> The task is a directory based task, so attributes like <tt>includes=&quot;**\/*.vb&quot;</tt> and <tt>excludes=&quot;broken.vb&quot;</tt> can be used to control the files pulled in. By default, all *.vb files from the project folder down are included in the command. When this happens the destFile -if not specified- is taken as the first file in the list, which may be somewhat hard to control. Specifying the output file with <tt>destfile</tt> is prudent. </p> <p> Also, dependency checking only works if destfile is set. As with <code>&lt;csc&gt;</code> nested <tt>src</tt> filesets of source, reference filesets, definitions and resources can be provided. <p> Example </p> <pre>&lt;vbc optimize=&quot;true&quot; debug=&quot;false&quot; warnLevel=&quot;4&quot; targetType=&quot;exe&quot; definitions=&quot;RELEASE&quot; excludes=&quot;src/unicode_class.vb&quot; mainClass = &quot;MainApp&quot; destFile=&quot;NetApp.exe&quot; optionExplicit=&quot;true&quot; optionCompare=&quot;text&quot; references="System.Xml,System.Web.Xml" &gt; &lt;reference file="${testCSC.dll}"/&gt; &lt;define name="RELEASE"/&gt; &lt;define name="DEBUG" if="debug.property"/&gt; &lt;define name="def3" unless="def2.property"/&gt; &lt;/vbc&gt; </pre>
66 </blockquote></td></tr>
67
68 </table>
69 <!-- End Description -->
70
71 <!-- Start Attributes -->
72 <table border="0" cellspacing="0" cellpadding="2" width="100%">
73 <tr><td>&nbsp;</td></tr>
74 <tr><td bgcolor="#525D76">
75 <font color="#ffffff" face="arial,helvetica.sanserif">
76 <a name="attributes">
77 <strong>Parameters</strong></a></font>
78 </td></tr>
79 <tr><td><blockquote>
80 <table>
81 <tr>
82 <td bgcolor="#cccccc" valign="top" align="left">
83 <font color="#000000" size="-1" face="arial,helvetica,sanserif"><b>Attribute</b></font>
84 </td>
85 <td bgcolor="#cccccc" valign="top" align="left">
86 <font color="#000000" size="-1" face="arial,helvetica,sanserif"><b>Description</b></font>
87 </td>
88 <td bgcolor="#cccccc" valign="top" align="left">
89 <font color="#000000" size="-1" face="arial,helvetica,sanserif"><b>Type</b></font>
90 </td>
91 <td bgcolor="#cccccc" valign="top" align="left">
92 <font color="#000000" size="-1" face="arial,helvetica,sanserif"><b>Requirement</b></font>
93 </td>
94 </tr>
95 <!-- Attribute Group -->
96
97 <!-- Attribute Group -->
98 <!-- Attribute -->
99 <tr>
100 <td bgcolor="#eeeeee" valign="top" align="left">
101 <font color="#000000" size="-1" face="arial,helvetica,sanserif">additionalmodules</font>
102 </td>
103 <td bgcolor="#eeeeee" valign="top" align="left">
104 <font color="#000000" size="-1" face="arial,helvetica,sanserif">Semicolon separated list of modules to refer to.</font>
105 </td>
106 <td bgcolor="#eeeeee" valign="top" align="left">
107 <font color="#000000" size="-1" face="arial,helvetica,sanserif">String</font>
108 </td>
109 <td bgcolor="#eeeeee" valign="top" align="left" rowspan="24">
110 <font color="#000000" size="-1" face="arial,helvetica,sanserif">Optional</font>
111 </td>
112 </tr>
113 <!-- Attribute -->
114 <tr>
115 <td bgcolor="#eeeeee" valign="top" align="left">
116 <font color="#000000" size="-1" face="arial,helvetica,sanserif">debug</font>
117 </td>
118 <td bgcolor="#eeeeee" valign="top" align="left">
119 <font color="#000000" size="-1" face="arial,helvetica,sanserif">set the debug flag on or off.</font>
120 </td>
121 <td bgcolor="#eeeeee" valign="top" align="left">
122 <font color="#000000" size="-1" face="arial,helvetica,sanserif">boolean</font>
123 </td>
124 </tr>
125 <!-- Attribute -->
126 <tr>
127 <td bgcolor="#eeeeee" valign="top" align="left">
128 <font color="#000000" size="-1" face="arial,helvetica,sanserif">destdir</font>
129 </td>
130 <td bgcolor="#eeeeee" valign="top" align="left">
131 <font color="#000000" size="-1" face="arial,helvetica,sanserif">Set the destination directory of files to be compiled.</font>
132 </td>
133 <td bgcolor="#eeeeee" valign="top" align="left">
134 <font color="#000000" size="-1" face="arial,helvetica,sanserif">File</font>
135 </td>
136 </tr>
137 <!-- Attribute -->
138 <tr>
139 <td bgcolor="#eeeeee" valign="top" align="left">
140 <font color="#000000" size="-1" face="arial,helvetica,sanserif">destfile</font>
141 </td>
142 <td bgcolor="#eeeeee" valign="top" align="left">
143 <font color="#000000" size="-1" face="arial,helvetica,sanserif">Set the name of exe/library to create.</font>
144 </td>
145 <td bgcolor="#eeeeee" valign="top" align="left">
146 <font color="#000000" size="-1" face="arial,helvetica,sanserif">File</font>
147 </td>
148 </tr>
149 <!-- Attribute -->
150 <tr>
151 <td bgcolor="#eeeeee" valign="top" align="left">
152 <font color="#000000" size="-1" face="arial,helvetica,sanserif">executable</font>
153 </td>
154 <td bgcolor="#eeeeee" valign="top" align="left">
155 <font color="#000000" size="-1" face="arial,helvetica,sanserif">set the name of the program, overriding the defaults. Can be used to set the full path to a program, or to switch to an alternate implementation of the command, such as the Mono or Rotor versions -provided they use the same command line arguments as the .NET framework edition</font>
156 </td>
157 <td bgcolor="#eeeeee" valign="top" align="left">
158 <font color="#000000" size="-1" face="arial,helvetica,sanserif">String</font>
159 </td>
160 </tr>
161 <!-- Attribute -->
162 <tr>
163 <td bgcolor="#eeeeee" valign="top" align="left">
164 <font color="#000000" size="-1" face="arial,helvetica,sanserif">extraoptions</font>
165 </td>
166 <td bgcolor="#eeeeee" valign="top" align="left">
167 <font color="#000000" size="-1" face="arial,helvetica,sanserif">Any extra options which are not explicitly supported by this task.</font>
168 </td>
169 <td bgcolor="#eeeeee" valign="top" align="left">
170 <font color="#000000" size="-1" face="arial,helvetica,sanserif">String</font>
171 </td>
172 </tr>
173 <!-- Attribute -->
174 <tr>
175 <td bgcolor="#eeeeee" valign="top" align="left">
176 <font color="#000000" size="-1" face="arial,helvetica,sanserif">failonerror</font>
177 </td>
178 <td bgcolor="#eeeeee" valign="top" align="left">
179 <font color="#000000" size="-1" face="arial,helvetica,sanserif">If true, fail on compilation errors.</font>
180 </td>
181 <td bgcolor="#eeeeee" valign="top" align="left">
182 <font color="#000000" size="-1" face="arial,helvetica,sanserif">boolean</font>
183 </td>
184 </tr>
185 <!-- Attribute -->
186 <tr>
187 <td bgcolor="#eeeeee" valign="top" align="left">
188 <font color="#000000" size="-1" face="arial,helvetica,sanserif">imports</font>
189 </td>
190 <td bgcolor="#eeeeee" valign="top" align="left">
191 <font color="#000000" size="-1" face="arial,helvetica,sanserif">Declare global imports for namespaces in referenced metadata files.</font>
192 </td>
193 <td bgcolor="#eeeeee" valign="top" align="left">
194 <font color="#000000" size="-1" face="arial,helvetica,sanserif">String</font>
195 </td>
196 </tr>
197 <!-- Attribute -->
198 <tr>
199 <td bgcolor="#eeeeee" valign="top" align="left">
200 <font color="#000000" size="-1" face="arial,helvetica,sanserif">includedefaultreferences</font>
201 </td>
202 <td bgcolor="#eeeeee" valign="top" align="left">
203 <font color="#000000" size="-1" face="arial,helvetica,sanserif">If true, automatically includes the common assemblies in dotnet, and tells the compiler to link in mscore.dll. set the automatic reference inclusion flag on or off this flag controls the /nostdlib option in CSC</font>
204 </td>
205 <td bgcolor="#eeeeee" valign="top" align="left">
206 <font color="#000000" size="-1" face="arial,helvetica,sanserif">boolean</font>
207 </td>
208 </tr>
209 <!-- Attribute -->
210 <tr>
211 <td bgcolor="#eeeeee" valign="top" align="left">
212 <font color="#000000" size="-1" face="arial,helvetica,sanserif">mainclass</font>
213 </td>
214 <td bgcolor="#eeeeee" valign="top" align="left">
215 <font color="#000000" size="-1" face="arial,helvetica,sanserif">Sets the name of main class for executables.</font>
216 </td>
217 <td bgcolor="#eeeeee" valign="top" align="left">
218 <font color="#000000" size="-1" face="arial,helvetica,sanserif">String</font>
219 </td>
220 </tr>
221 <!-- Attribute -->
222 <tr>
223 <td bgcolor="#eeeeee" valign="top" align="left">
224 <font color="#000000" size="-1" face="arial,helvetica,sanserif">optimize</font>
225 </td>
226 <td bgcolor="#eeeeee" valign="top" align="left">
227 <font color="#000000" size="-1" face="arial,helvetica,sanserif">If true, enables optimization flag.</font>
228 </td>
229 <td bgcolor="#eeeeee" valign="top" align="left">
230 <font color="#000000" size="-1" face="arial,helvetica,sanserif">boolean</font>
231 </td>
232 </tr>
233 <!-- Attribute -->
234 <tr>
235 <td bgcolor="#eeeeee" valign="top" align="left">
236 <font color="#000000" size="-1" face="arial,helvetica,sanserif">optioncompare</font>
237 </td>
238 <td bgcolor="#eeeeee" valign="top" align="left">
239 <font color="#000000" size="-1" face="arial,helvetica,sanserif">Specify binary- or text-style string comparisons. Defaults to "binary"</font>
240 </td>
241 <td bgcolor="#eeeeee" valign="top" align="left">
242 <font color="#000000" size="-1" face="arial,helvetica,sanserif">String</font>
243 </td>
244 </tr>
245 <!-- Attribute -->
246 <tr>
247 <td bgcolor="#eeeeee" valign="top" align="left">
248 <font color="#000000" size="-1" face="arial,helvetica,sanserif">optionexplicit</font>
249 </td>
250 <td bgcolor="#eeeeee" valign="top" align="left">
251 <font color="#000000" size="-1" face="arial,helvetica,sanserif">Whether to require explicit declaration of variables.</font>
252 </td>
253 <td bgcolor="#eeeeee" valign="top" align="left">
254 <font color="#000000" size="-1" face="arial,helvetica,sanserif">boolean</font>
255 </td>
256 </tr>
257 <!-- Attribute -->
258 <tr>
259 <td bgcolor="#eeeeee" valign="top" align="left">
260 <font color="#000000" size="-1" face="arial,helvetica,sanserif">optionstrict</font>
261 </td>
262 <td bgcolor="#eeeeee" valign="top" align="left">
263 <font color="#000000" size="-1" face="arial,helvetica,sanserif">Enforce strict language semantics.</font>
264 </td>
265 <td bgcolor="#eeeeee" valign="top" align="left">
266 <font color="#000000" size="-1" face="arial,helvetica,sanserif">boolean</font>
267 </td>
268 </tr>
269 <!-- Attribute -->
270 <tr>
271 <td bgcolor="#eeeeee" valign="top" align="left">
272 <font color="#000000" size="-1" face="arial,helvetica,sanserif">referencefiles</font>
273 </td>
274 <td bgcolor="#eeeeee" valign="top" align="left">
275 <font color="#000000" size="-1" face="arial,helvetica,sanserif">Path of references to include. Wildcards should work.</font>
276 </td>
277 <td bgcolor="#eeeeee" valign="top" align="left">
278 <font color="#000000" size="-1" face="arial,helvetica,sanserif">Path</font>
279 </td>
280 </tr>
281 <!-- Attribute -->
282 <tr>
283 <td bgcolor="#eeeeee" valign="top" align="left">
284 <font color="#000000" size="-1" face="arial,helvetica,sanserif">references</font>
285 </td>
286 <td bgcolor="#eeeeee" valign="top" align="left">
287 <font color="#000000" size="-1" face="arial,helvetica,sanserif">Semicolon separated list of DLLs to refer to.</font>
288 </td>
289 <td bgcolor="#eeeeee" valign="top" align="left">
290 <font color="#000000" size="-1" face="arial,helvetica,sanserif">String</font>
291 </td>
292 </tr>
293 <!-- Attribute -->
294 <tr>
295 <td bgcolor="#eeeeee" valign="top" align="left">
296 <font color="#000000" size="-1" face="arial,helvetica,sanserif">removeintchecks</font>
297 </td>
298 <td bgcolor="#eeeeee" valign="top" align="left">
299 <font color="#000000" size="-1" face="arial,helvetica,sanserif">Whether to remove integer checks. Default false.</font>
300 </td>
301 <td bgcolor="#eeeeee" valign="top" align="left">
302 <font color="#000000" size="-1" face="arial,helvetica,sanserif">boolean</font>
303 </td>
304 </tr>
305 <!-- Attribute -->
306 <tr>
307 <td bgcolor="#eeeeee" valign="top" align="left">
308 <font color="#000000" size="-1" face="arial,helvetica,sanserif">rootnamespace</font>
309 </td>
310 <td bgcolor="#eeeeee" valign="top" align="left">
311 <font color="#000000" size="-1" face="arial,helvetica,sanserif">Specifies the root namespace for all type declarations.</font>
312 </td>
313 <td bgcolor="#eeeeee" valign="top" align="left">
314 <font color="#000000" size="-1" face="arial,helvetica,sanserif">String</font>
315 </td>
316 </tr>
317 <!-- Attribute -->
318 <tr>
319 <td bgcolor="#eeeeee" valign="top" align="left">
320 <font color="#000000" size="-1" face="arial,helvetica,sanserif">srcdir</font>
321 </td>
322 <td bgcolor="#eeeeee" valign="top" align="left">
323 <font color="#000000" size="-1" face="arial,helvetica,sanserif">Set the source directory of the files to be compiled.</font>
324 </td>
325 <td bgcolor="#eeeeee" valign="top" align="left">
326 <font color="#000000" size="-1" face="arial,helvetica,sanserif">File</font>
327 </td>
328 </tr>
329 <!-- Attribute -->
330 <tr>
331 <td bgcolor="#eeeeee" valign="top" align="left">
332 <font color="#000000" size="-1" face="arial,helvetica,sanserif">targettype</font>
333 </td>
334 <td bgcolor="#eeeeee" valign="top" align="left">
335 <font color="#000000" size="-1" face="arial,helvetica,sanserif">set the target type to one of exe|library|module|winexe</font>
336 </td>
337 <td bgcolor="#eeeeee" valign="top" align="left">
338 <font color="#000000" size="-1" face="arial,helvetica,sanserif">"exe", "library", "module", "winexe"</font>
339 </td>
340 </tr>
341 <!-- Attribute -->
342 <tr>
343 <td bgcolor="#eeeeee" valign="top" align="left">
344 <font color="#000000" size="-1" face="arial,helvetica,sanserif">utf8output</font>
345 </td>
346 <td bgcolor="#eeeeee" valign="top" align="left">
347 <font color="#000000" size="-1" face="arial,helvetica,sanserif">If true, require all compiler output to be in UTF8 format.</font>
348 </td>
349 <td bgcolor="#eeeeee" valign="top" align="left">
350 <font color="#000000" size="-1" face="arial,helvetica,sanserif">boolean</font>
351 </td>
352 </tr>
353 <!-- Attribute -->
354 <tr>
355 <td bgcolor="#eeeeee" valign="top" align="left">
356 <font color="#000000" size="-1" face="arial,helvetica,sanserif">warnlevel</font>
357 </td>
358 <td bgcolor="#eeeeee" valign="top" align="left">
359 <font color="#000000" size="-1" face="arial,helvetica,sanserif">Level of warning currently between 1 and 4 with 4 being the strictest.</font>
360 </td>
361 <td bgcolor="#eeeeee" valign="top" align="left">
362 <font color="#000000" size="-1" face="arial,helvetica,sanserif">int</font>
363 </td>
364 </tr>
365 <!-- Attribute -->
366 <tr>
367 <td bgcolor="#eeeeee" valign="top" align="left">
368 <font color="#000000" size="-1" face="arial,helvetica,sanserif">win32icon</font>
369 </td>
370 <td bgcolor="#eeeeee" valign="top" align="left">
371 <font color="#000000" size="-1" face="arial,helvetica,sanserif">Set the filename of icon to include.</font>
372 </td>
373 <td bgcolor="#eeeeee" valign="top" align="left">
374 <font color="#000000" size="-1" face="arial,helvetica,sanserif">File</font>
375 </td>
376 </tr>
377 <!-- Attribute -->
378 <tr>
379 <td bgcolor="#eeeeee" valign="top" align="left">
380 <font color="#000000" size="-1" face="arial,helvetica,sanserif">win32res</font>
381 </td>
382 <td bgcolor="#eeeeee" valign="top" align="left">
383 <font color="#000000" size="-1" face="arial,helvetica,sanserif">Sets the filename of a win32 resource (.RES) file to include. This is not a .NET resource, but what Windows is used to.</font>
384 </td>
385 <td bgcolor="#eeeeee" valign="top" align="left">
386 <font color="#000000" size="-1" face="arial,helvetica,sanserif">File</font>
387 </td>
388 </tr>
389
390
391 </table>
392 </blockquote></td></tr>
393
394 </table>
395 <!-- End Attributes -->
396
397 <!-- Start Elements -->
398 <table border="0" cellspacing="0" cellpadding="2" width="100%">
399 <tr><td>&nbsp;</td></tr>
400
401 <tr><td bgcolor="#525D76">
402 <font color="#ffffff" face="arial,helvetica.sanserif">
403 <a name="elements">
404 <strong>Parameters as nested elements</strong></a></font>
405 </td></tr>
406
407 <tr><td><blockquote>
408 <!-- Start Element -->
409 <table border="0" cellspacing="0" cellpadding="2" width="100%">
410 <tr><td>&nbsp;</td></tr>
411 <tr><td bgcolor="#828DA6">
412 <font color="#ffffff" face="arial,helvetica.sanserif" size="-1">
413 <strong>define</strong> (org.apache.tools.ant.taskdefs.optional.dotnet.DotnetDefine)</font>
414 </td></tr>
415 <tr><td><blockquote>
416 add a define to the list of definitions
417 </blockquote></td></tr>
418 </table>
419 <!-- End Element -->
420 <!-- Start Element -->
421 <table border="0" cellspacing="0" cellpadding="2" width="100%">
422 <tr><td>&nbsp;</td></tr>
423 <tr><td bgcolor="#828DA6">
424 <font color="#ffffff" face="arial,helvetica.sanserif" size="-1">
425 <strong>reference</strong> (org.apache.tools.ant.types.FileSet)</font>
426 </td></tr>
427 <tr><td><blockquote>
428 add a new reference fileset to the compilation
429 </blockquote></td></tr>
430 </table>
431 <!-- End Element -->
432 <!-- Start Element -->
433 <table border="0" cellspacing="0" cellpadding="2" width="100%">
434 <tr><td>&nbsp;</td></tr>
435 <tr><td bgcolor="#828DA6">
436 <font color="#ffffff" face="arial,helvetica.sanserif" size="-1">
437 <strong>resource</strong> (org.apache.tools.ant.taskdefs.optional.dotnet.DotnetResource)</font>
438 </td></tr>
439 <tr><td><blockquote>
440 link or embed a resource
441 </blockquote></td></tr>
442 </table>
443 <!-- End Element -->
444 <!-- Start Element -->
445 <table border="0" cellspacing="0" cellpadding="2" width="100%">
446 <tr><td>&nbsp;</td></tr>
447 <tr><td bgcolor="#828DA6">
448 <font color="#ffffff" face="arial,helvetica.sanserif" size="-1">
449 <strong>src</strong> (org.apache.tools.ant.types.FileSet)</font>
450 </td></tr>
451 <tr><td><blockquote>
452 add a new source directory to the compile
453 </blockquote></td></tr>
454 </table>
455 <!-- End Element -->
456
457 </blockquote></td></tr>
458
459 </table>
460 <!-- End Elements -->
461
462
463 </td>
464 </tr>
465 <!-- END RIGHT SIDE MAIN BODY -->
466
467</table>
468
469</body>
470</html>
Note: See TracBrowser for help on using the repository browser.