resync these
[mono.git] / web / faq
1 <a href="#basics">Basics</a><br>
2 <a href="#novell">The Novell Role in the Mono project</a><br>
3 <a href="#gnome">Mono and GNOME</a><br>
4 <a href="#gui">Building GUI applications with Mono</a><br>
5 <a href="#msft">Mono and Microsoft</a><br>
6 <a href="#platforms">Mono platforms</a><br>
7 <a href="#compatibility">Compatibility</a></br>
8 <a href="#pnpproject">Mono and the Portable.NET Project</a><br>
9 <a href="#webservices">Web Services</a><br>
10 <a href="#asp">Mono and ASP.NET</a><br>
11 <a href="#ado">Mono and ADO.NET</a><br>
12 <a href="#monodoc">MonoDoc</a><br>
13 <a href="#devel">Development Tools and Issues</a><br>
14 <a href="#java">Mono and Java</a><br>
15 <a href="#extending">Extending Mono</a><br>
16 <a href="#portability">Portability</a><br>
17 <a href="#reuse">Reusing Existing Code</a><br>
18 <a href="#gcc">Mono and GCC</a><br>
19 <a href="#performance">Performance</a><br>
20 <a href="#licensing">Licensing</a><br>
21 <a href="#patents">Patents</a><br>
22 <a href="#etc">Miscellaneous Questions</a><br>
23 <a href="#obfuscation">Obfuscation</a></br>
24 <a href="#problems">Mono Common Problems</a><br>
25
26 A <a
27 href="http://www.monohispano.org/tutoriales/mono-puf//">Spanish
28 translation</a> is also available (it is outdated though)
29
30 <a name="basics"></a>
31 ** Basics
32
33 Q: What is Mono exactly?
34
35 A: The Mono Project is an open development initiative sponsored by
36    Ximian that is working to develop an open source, Unix
37    version of the Microsoft .NET development platform.  Its objective
38    is to enable Unix developers to build and
39    deploy cross-platform .NET Applications.  The project will
40    implement various technologies developed by Microsoft that have now
41    been submitted to the ECMA for standardization.
42
43    The Mono project has also sparked a lot of interest in developing
44    C#-based components, libraries and frameworks.  Today Mono is not
45    limited to implement the .NET Framework, but also contains other
46    components.  Some of the components of the Mono platform were
47    developed by the Mono team, and some others we have incorporated
48    from other open source efforts, the most important ones:
49
50    <ul>
51         <li><a
52         href="http://remoting-corba.sourceforge.net/">Remoting.CORBA</a>: A
53         CORBA implementation for Mono.
54
55         <li>Ginzu: An implementation on top of Remoting for the <a
56         href="http://www.zeroc.com">ICE</a> stack
57
58         <li><a href="http://gtk-sharp.sf.net">Gtk#</a>: Bindings for
59         the popular Gtk+ GUI toolkit for Unix and Windows systems.
60         Other bindings are available: Diacanvas-Sharp and MrProject.
61
62         <li><a
63         href="http://www.icsharpcode.net/OpenSource/SharpZipLib/Default.aspx">#ZipLib</a>:
64         A library to manipulate various kinds of compressed files and
65         archives (Zip and tar).
66
67         <li>GlGen (available from the Mono CVS): Bindings for OpenGL.
68
69         <li>Mono.LDAP: LDAP access for .NET apps.
70
71         <li>Mono.Data: We ship support for Postgress, MySql, Sybase,
72         DB2, SqlLite, Tds (SQL server protocol) and Oracle databases. 
73
74         <li>Mono.Cairo: Bindings for the <a
75         href="http://www.cairographics.org">Cairo</a> rendering
76         engine (Our System.Drawing is implemented on top of this).
77
78         <li>Mono.Posix: Bindings for building POSIX applications using
79         C#. 
80
81         <li>Mono.Http: Support for creating custom, embedded HTTP
82         servers and common HTTP handlers for your applications.
83    </ul>
84
85 Q: What is the difference between Mono and the .NET Initiative?
86
87 A: The ".NET Initiative" is a somewhat nebulous company-wide effort by
88    Microsoft, one part of which is a cross-platform development
89    framework.  Mono is an implementation of the development framework,
90    but not an implementation of anything else related to the .NET
91    Initiative, such as Passport or software-as-a-service.
92
93 Q: What technologies are included in Mono?
94
95 A: Mono contains a number of components useful for building new
96    software:
97
98         <ul>
99                 * A Common Language Infrastructure (CLI) virtual
100                   machine that contains a class loader, Just-in-time
101                   compiler, and a garbage collecting runtime.
102
103                 * A class library that can work with any language
104                   which works on the CLR.  Both .NET compatible class
105                   libraries as well as Mono-provided class libraries
106                   are included.
107
108                 * A compiler for the C# language.  In the future we
109                   might work on other compilers that target the Common
110                   Language Runtime.
111         </ul>
112
113
114    Windows has compilers that target the virtual machine from <a
115    href="http://msdn.microsoft.com/net/thirdparty/default.asp#lang">a
116    number of languages:</a> Managed C++, Java Script, Eiffel,
117    Component Pascal, APL, Cobol, Perl, Python, Scheme,
118    Smalltalk, Standard ML, Haskell, Mercury and Oberon.
119
120    The CLR and the Common Type System (CTS) enables applications and
121    libraries to be written in a collection of different languages that
122    target the byte code
123
124    This means for example that if you define a class to do algebraic
125    manipulation in C#, that class can be reused from any other
126    language that supports the CLI.  You could create a class in C#,
127    subclass it in C++ and instantiate it in an Eiffel program. 
128
129    A single object system, threading system, class libraries, and
130    garbage collection system can be shared across all these languages.
131    
132 Q: Where can I find the specification for these technologies?
133
134 A: You can find the information here:
135  
136
137    C# <a href="http://www.ecma.ch/ecma1/STAND/ecma-334.htm">http://www.ecma.ch/ecma1/STAND/ecma-334.htm</a>
138
139    CLI <a href="http://www.ecma.ch/ecma1/STAND/ecma-335.htm">http://www.ecma.ch/ecma1/STAND/ecma-335.htm</a>
140
141 Q: Will you implement the .NET Framework SDK class libraries?
142
143 A: Yes, we will be implementing the APIs of the .NET Framework SDK
144    class libraries. 
145
146 Q: Will you offer an ECMA-compliant set of class libraries?
147
148 A: Eventually we will.  Our current focus is on inter-operating
149    with the Microsoft SDK, but we will also offer an ECMA compliant
150    subset of the libraries. 
151
152 Q: What does the name "Mono" mean?
153
154 A: Mono is the word for `monkey' in Spanish. We like monkeys.  
155
156 Q: Does Mono work today?
157
158 A: The execution engine works on various platforms, we support
159    Just-in-Time and Ahead-of-Time compilations on Intel x86 machines
160    (and soon PowerPC).
161
162    The class libraries are mature enough to run various real
163    applications: our C# compiler, ASP.NET, and Gtk#-based
164    applications.
165
166 Q: When will you ship Mono?
167
168 A: Please see the <a href="mono-roadmap.html">Mono Roadmap</a> for
169    more details on the release plans.  
170
171 Q: How can I contribute?
172
173 A: Check the <a href="contributing.html">contributing</a> section. 
174
175 Q: Aren't you just copying someone else's work?
176
177 A: We are interested in providing the best tools for programmers to
178    develop applications for Free Operating Systems.  We also want to help
179    provide the interoperability that will allow those systems to fit in
180    with other standards.
181
182    For more background, read the <a href="http://www.go-mono.com/rationale.html">Mono
183    Project white paper</a>.
184    the project.
185
186 Q: Miguel said once that Mono was being implemented in COBOL. Is that true?.
187
188 A: No. It was a joke.
189
190
191 <a name="novell"></a> 
192
193 ** The Novell Role in the Mono Project
194
195 Q: Why is Novell working on .NET?
196
197 A: Novell is interested in providing the best tools for programmers to
198    develop applications for Free Operating Systems.
199
200    For more information, read the project <a
201    href="rationale.html">rationale</a> page.
202
203 Q: Will Novell be able to take on a project of this size?  
204
205 A: Of course not.  Novell is a supporter of the Mono project, but the only way
206    to implement something of this size is for the entire free software
207    community to get involved. Visit the <a href="contributing.html">contributing</a> 
208    page if you'd like to help out.
209
210 Q: What pieces is Novell working on?
211
212 A: We will devote most of our resources to work on the pieces which are
213    on the critical path to release a development and execution
214    environment. Once the project is at a stage where it is useful in
215    the real world, it will achieve a critical mass of developers to
216    improve it further.
217
218 Q: Will Novell offer Mono commercially?
219
220 A: When Mono is ready to be shipped Ximian will offer a commercial
221    support and services for Mono. Mono components are also
222    available to be licensed commercially. For licensing details,
223    contact <a
224    href="mailto:mono-licensing@ximian.com">mono-licensing@ximian.com</a>
225
226 Q: Does Novell provide consulting services around Mono?
227
228 A: Yes, Novell does provide consulting services around Mono to
229    make it suitable to your needs.  Porting the runtime engine,
230    customizing it, working on specific classes or tuning the code
231    for your particular needs. 
232
233    Please contact <a
234    href="mailto:mono-licensing@ximian.com">mono-licensing@ximian.com</a>
235    for consulting services information.
236
237 Q: Will you wait until Mono is finished?
238
239 A: Mono will ship on various stages as they mature.  Some people
240    require only a subset of the technologies, those will ship first,
241    see the <a href="mono-roadmap.html">Mono Roadmap</a> for details
242
243 <a name="gnome"></a> 
244 ** Mono and GNOME
245
246 Q: How is Mono related to GNOME?
247
248 A: In a number of ways.  This project was born out of the need of
249    providing improved tools for the GNOME community, and will use
250    existing components that have been developed for GNOME when they
251    are available.  For example, we plan to use Gtk+ and Libart to
252    implement Winforms and the Drawing2D API and are considering
253    GObject support.
254
255    Mono team members work actively on the <a
256    href="http://gtk-sharp.sf.net">Gtk#</a> project: a binding of the
257    GNOME class libraries for .NET and Mono.
258
259 Q: Has the GNOME Foundation or the GNOME team adopted Mono?
260
261 A: Mono is too new to be adopted by those groups. We hope that the
262    tools that we will provide will be adopted by free software
263    programmers including the GNOME Foundation members and the GNOME
264    project generally.
265
266 Q: Should GNOME programmers switch over to Mono now?
267
268 A: It is still far to early for discussions of "switching over."  No
269    pieces of Mono will be ready within the next six months, and a
270    complete implementation is roughly one year away.
271
272    We encourage GNOME developers to continue using the existing tools,
273    libraries and components.  Improvements made to GNOME will have an
274    impact on Mono, as they would be the "back-end" for various classes.
275
276 Q: Will Mono include compatibility with Bonobo components? What is the
277    relationship between Mono and Bonobo?
278
279 A: Yes, we will provide a set of classes for implementing and using
280    Bonobo components from within Mono.  Mono should allow you to write
281    Bonobo components more easily, just like .NET on Windows allows you
282    to export .NET components to COM.
283
284 Q: Does Mono depend on GNOME?
285
286 A: No, Mono does not depend on GNOME.  We use a few packages produced by
287    the GNOME team like the `glib' library, we also use other
288    third-party open source libraries like Cairo and ICU.
289
290 Q: But will I be able to build GNOME applications?
291
292 A: Yes, we will enable people to write GNOME applications using Mono.
293
294 Q: Do you have C# bindings for GNOME?.
295
296 A: Yes, the <a href="http://gtk-sharp.sf.net">Gtk# project</a>
297    provides bindings for Gtk+, Gdk, Atk, libgnome, libgnomecanvas, and
298    libgnomeui.  Other libraries under the GNOME framework will be
299    added on an as-needed (and as-requested) basis.
300
301 <a name="gui"></a>
302 ** GUI applications
303
304 Q: Will Mono enable GUI applications to be authored?
305
306 A: Yes, you will be able to build GUI applications.  Indeed, that is
307    our main focus.  Today you can use Gtk# or #WT to develop GUI
308    applications, and support for Windows.Forms is underway.
309
310 Q: What is the difference between Gtk# and System.Windows.Forms?
311
312 A: Gtk# is a set of bindings for the Gtk+ toolkit for C# (and other
313    CIL-enabled languages), it integrates natively with the Gnome
314    desktop.  System.Windows.Forms is an API defined by Microsoft to
315    build GUI applications.
316
317 Q: What are you using to implement Windows.Forms?
318
319 A: Windows.Forms is currently being implemented on top of a modified
320    version of Wine that can be used as a library: WineLib.
321
322    Essentially Wine is used as a library that happens to implement the
323    "Win32" toolkit and our Windows.Forms becomes a managed layer on
324    top of this toolkit.
325
326    There are several advantages in this approach: we get Wndproc
327    message compatibility for free (Wndproc is an overridable method in
328    the Control class and it is used to perform advanced tricks with
329    the GUI toolkit) as well as allowing third-party controls that are
330    used to P/Invoke into Win32 in the Windows world to work out of the
331    box on Linux/MacOS.
332
333 Q: Why not implement System.Windows.Forms on top of Gtk# or Qt#?
334
335 A: Compatibility.
336
337    Although it is possible to run simple Windows.Forms applications
338    with the Gtk#-based backend of Windows.Forms, it is very unlikely
339    that the implementation will ever implement everything needed for
340    full compatibility with Windows.Forms.
341
342    The reason is that Windows.Forms is not a complete toolkit, and to
343    work around this problem some of the underlying Win32 foundation is
344    exposed to the programmer in the form of exposing the Windows
345    message handler (WndProc).  Any control can override this method.
346    Also developers often P/Invoke into Win32 to get to functionality
347    that was not wrapped. 
348
349    To achieve full compatibility, we would have to emulate this, and
350    it would take too long.
351
352    For more details see the <a href="winforms.html">winforms page</a>
353
354 Q: Wine applications do not look like native applications, what are
355    you going to do about this?  
356
357 A: We have already a few patches into our version of Windows.Forms
358    that makes Wine use the colors and font settings from your desktop,
359    improving the integration a lot.   In the future, we will continue
360    to improve this interoperability scenario.
361
362 Q: Will I be able to run my smart clients on systems powered by Mono?
363
364 A: As long as your applications are 100% .NET and do not make use
365    of P/Invoke to call Win32 functions, your smart client applications
366    will run on Mono platforms.
367
368 Q: Where can I learn more about Gtk#?
369
370 A: The following <a href="http://gtk-sharp.sourceforge.net">link</a> sends you to the page of the project.
371
372 Q: What can I do with Gtk#?. 
373
374 A: Gtk# is becoming very usable and you can create applications and
375    applets like those you see in a GNOME desktop environment. It's 
376    easy to install so it's worth a try. 
377
378 Q: How can I compile my HelloWorld.cs which uses Gtk#?.
379
380 A: Try: mcs -r:gtk-sharp HelloWorld.cs
381
382 Q: Is there any way how to connect DataAdapter to some GTK# controls?
383
384 A: There is a sample file called `DbClient' in gtk-sharp/samples that you
385    might to look at.  It is a sample program in Gtk# that adds/updates/deletes 
386    information on a Postgress database. When we have the new table/tree widgets, 
387    I am sure someone would write an adapter for System.Data (in Gtk2 the 
388    tree/list widgets are written using a view/model, so you only need to write 
389    a model that maps to the database). You can have a look at 
390    gtk-sharp/sample/DbClient, where there is a GTK# application that uses 
391    System.Data. It does not use DataAdapter, but DataReader though.
392
393 Q: Do you have an estimate for when Windows.Forms will be released?
394
395 A: The plan currently is aimed at Q4/2004.
396
397
398 Q: Do you have a comparission chart about the various toolkit
399    offerings?
400
401 A: A document explaining this is available at: <a
402    href="http://primates.ximian.com/~miguel/toolkits.html">http://primates.ximian.com/~miguel/toolkits.html</a>.
403
404 <a name="msft"></a>
405 ** Mono and Microsoft
406
407 Q: Is Microsoft helping Ximian with this project?
408
409 A: There is no high level communication between Ximian and Microsoft
410    at this point, but engineers who work on .NET or the ECMA groups
411    have been very friendly, and very nice to answer our questions, or
412    clarify part of the specification for us. 
413
414    Microsoft is interested in other implementations of .NET and are
415    willing to help make the ECMA spec more accurate for this purpose.
416
417    Ximian was also invited to participate in the ECMA committee
418    meetings for C# and the CLI.
419
420 Q: Are Microsoft or Corel paying Ximian to do this?
421
422 A: No.
423
424 Q: Do you fear that Microsoft will change the spec and render Mono
425    useless?
426
427 A: No.  Microsoft proved with the CLI and the C# language that it was
428    possible to create a powerful foundation for many languages to
429    inter-operate.  We will always have that.  
430
431    Even if changes happened in the platform which were undocumented,
432    the existing platform would a value on its own.
433
434 Q: Are you writing Mono from the ECMA specs?
435
436 A: Yes, we are writing them from the ECMA specs and the published
437    materials in print about .NET.
438
439 Q: If my applications use Mono, will I have to pay a service fee?
440
441 A: No.  Mono is not related to Microsoft's initiative of
442    software-as-a-service.
443
444 Q: Is the Mono Project is related to the Microsoft Hailstorm effort?  Is
445    Ximian endorsing Hailstorm?  
446
447 A: No.  The Mono Project is focused on providing a compatible set of
448    tools for the Microsoft .NET development platform.  It does not
449    address, require, or otherwise endorse the MS Passport-based
450    Hailstorm single sign-on system that is part of Windows XP and
451    other services.
452
453 Q: Will Mono or .NET applications depend on Microsoft Passport?
454
455 A: No. MS Passport is unrelated to running .NET compatible applications
456    produced with the Mono tools.  The only thing you will need is a
457    just-in-time compiler (JIT).
458
459 Q: If Microsoft will release a port of their .NET platform under the
460    `Shared Source' license, why should I bother with anything else?
461
462 A: The Shared Source implementation will be expensive and its uses
463    will be tightly restricted, especially for commercial use. We are
464    working towards an implementation that will grant a number of
465    important rights to recipients: use for any purpose,
466    redistribution, modification, and redistribution of modifications.
467
468    This is what we call <a
469    href="http://www.gnu.org/philosophy/free-sw.html">Free Software</a>
470
471 Q: Is Mono a free implementation of Passport?
472
473 A: No. Mono is just a runtime, a compiler and a set of class
474    libraries.
475
476 Q: Will the System.Web.Security.PassportIdentity class mean
477    that my software will depend on Passport?
478    
479 A: No.  Applications may use that API to contact a Passport site, but
480    are not required to do so.
481
482    As long as your application does not use Passport, you will not
483    need Passport.  
484
485 Q: Will Mono running on Linux make Passport available for Linux?
486
487 A: No.  However, the Passport toolkit for Linux-based web servers is
488    available from Microsoft.
489
490 Q: Will Mono allow me to run Microsoft Office on Linux?
491
492 A: No, it will not.  Microsoft Office is a Windows application.  To
493    learn more about running Windows applications on Intel Unix systems
494    refer to <a href="http://www.winehq.com">the Wine Project</a>.
495
496 Q: Can mono run the WebMatrix?
497
498 A: No. That requires System.Windows.Forms support which is not
499    currently implemented.
500
501 Q: Does mono have something like Passport? 
502    Will mono have a server side Passport/Similar framework for XSP as well as client classes?
503
504 A: Not yet, but the client side API for authentication is not the problem. 
505    We will likely have a lot of other authentication APIs, like the Liberty
506    Alliance APIs. The problem is people on the web provider end that might use 
507    this for authentication.
508
509 <a name="platforms"></a>
510 ** Mono Platforms 
511
512 Q: What operating systems does Mono run on?
513
514 A: Mono is known to run on Linux, Unix and Windows systems.   
515
516 Q: Can I run Mono applications without using `mono program.exe'?
517
518 A: Yes, this is possible on Linux systems, to do this, use something like:
519
520 <pre>
521 if [ ! -e /proc/sys/fs/binfmt_misc/register ]; then
522         /sbin/modprobe binfmt_misc
523         mount -t binfmt_misc none /proc/sys/fs/binfmt_misc
524 fi
525
526 if [ -e /proc/sys/fs/binfmt_misc/register ]; then
527         echo ':CLR:M::MZ::/usr/bin/mono:' > /proc/sys/fs/binfmt_misc/register
528 else
529         echo "No binfmt_misc support"
530         exit 1
531 fi
532 </pre>
533
534 Q: What architectures does Mono support?
535
536 A: Mono today ships with a Just-in-Time compiler for x86, PowerPC and
537    SPARC-based systems.  It is tested regularly on Linux, FreeBSD and
538    Windows (with the XP/NT core).
539
540    There is also an interpreter, which is slower that runs on the
541    s390, SPARC, HPPA, StrongARM and PowerPC architectures.
542
543 Q: Can Mono run on Windows 9x, or ME editions?
544
545 A: Mono requires Unicode versions of Win32 APIs to run,
546    and only a handful of *W functions is supported under Win9x.
547
548    There is Microsoft Layer for Unicode that provides implementation
549    of these APIs on 9x systems.
550
551    Unfortunately it uses linker trick for delayed load that is not
552    supported by ld, so some sort of adapter is necessary.
553    
554    You will need MSLU and one of the following libs to link Mono to
555    unicows.dll <a
556    href="http://mono.eurosoft.od.ua/files/unimono.zip">http://mono.eurosoft.od.ua/files/unimono.zip</a>
557    or alternatively search the net for "libunicows".
558
559    No changes to Mono source code required, the only thing is to make
560    sure that linker will resolve imports to adapter library instead of
561    Win32 libs. This is achieved by inserting -lunimono before
562    -lkerner32/user32 in the linker's specs file.
563
564 Q: Why support Windows, when you can run the real thing?
565
566 A: There are various reasons:
567
568    <ul>
569       <li> About half the contributors to Mono are Windows developers.
570            They have many different for contributing to the effort, and
571            we find it very important to let those developers run the runtime on Windows without forcing
572            them to use a new operating system. 
573           
574       <li> Supporting Windows helps us identify the portable portions
575            of Mono from the non-portable versions of it, helping Mono
576            become more portable in the future.
577
578       <li> Mono does not heavily modify the windows registry, update system DLLs,
579            install DLLs to the Windows/System32 path.  Another words, I knew Mono would
580            not cause any legacy enterprise applications to stop working - and it
581            hasn't.  However, our CIO er is againt it because of the changes that would
582            be made to Windows 2000, such as, affecting security.
583    </ul>
584
585 <a name="compatibility"></a>
586 ** Compatibility
587
588 Q: Can Mono run applications developed with the Microsoft.NET framework?
589
590 A: Yes, Mono can run applications developed with the Microsoft .NET Framework
591    on Unix.  There are a few caveats to keep in mind: Mono has not
592    been completed yet, so a few API calls might be missing; And in
593    some cases the Mono behavior *might* be incorrect.
594
595 Q: Will missing API entry points be implemented?
596
597 A: Yes, the goal of Mono is to implement precisely the .NET Framework
598    API (as well as compile-time selectable subsets, for those
599    interested in a lighter version of Mono).
600
601 Q: If the behavior of an API call is different, will you fix it?
602
603 A: Yes, we will.  But we will need your assistance for this.  If you find a bug
604    in the Mono implementation, please fill a bug report in <a
605    href="http://bugzilla.ximian.com">http://bugzilla.ximian.com</a>.
606    Do not assume we know about the problem, we might not, and using the bug tracking
607    system helps us organize the development process.
608
609 Q: Can I develop my applications on Windows, and deploy on a supported
610    Mono platform (like Linux)?
611
612 A: Yes, you can.  
613
614    As of today, Mono is not 100% finished, so it is sometimes useful
615    to compile the code with Mono, to find out if your application
616    depends on unimplemented functionality. 
617
618 Q: Will applications run out the box with Mono?
619
620 A: Sometimes they will.  But sometimes a .NET application might invoke
621    Win32 API calls, or assume certain patterns that are not correct
622    for cross-platform applications.
623
624 Q: What is a 100% .NET application?
625
626 A: A `100% .NET application' is one that only uses the APIs defined
627    under the System namespace and does not use P/Invoke.  These
628    applications would in theory run unmodified on Windows, Linux,
629    HP-UX, Solaris, MacOS X and others. 
630
631    Note that this requirement also holds for all assemblies used by the
632    application.  If one of them is Windows-specific, then the entire program
633    is not a 100% .NET application.
634
635    Furthermore, a 100% .NET application must not contain non-standard data
636    streams in the assembly.  For example, Visual Studio .NET will insert a 
637    <tt>#-</tt> stream into assemblies built under the "Debug" target.  
638    This stream contains debugging information for use by Visual Studio .NET; 
639    however, this stream can not be interpreted by Mono (unless you're willing 
640    to donate support).
641
642    Thus, it is recommended that all Visual Studio .NET-compiled code be
643    compiled under the Release target before it is executed under Mono.
644
645 Q: Can I execute my Visual Studio .NET program (Visual Basic .NET, Visual C#,
646    Managed Extensions for C++, etc.) under Mono?
647
648 A: Yes, with some reservations.
649
650    The .NET program must either be a 100% .NET application, or (somehow) have
651    all dependent assemblies available on all desired platforms.  (How to do so
652    is outside the bounds of this FAQ.)
653
654    Mono must also have an implementation for the .NET assemblies used.  For
655    example the System.EnterpriseServices namespace is part of .NET, but it
656    has not been implemented in Mono.  Thus, any applications using this
657    namespace will not run under Mono.
658
659    With regards to languages, C# applications tend to be most portable.
660
661    Visual Basic .NET applications are portable, but Mono's 
662    Microsoft.VisualBasic.dll implementation is incomplete.  It is recommended 
663    to either avoid using this assembly in your own code, only use the 
664    portions that Mono has implemented, or to help implement the missing
665    features.  Additionally, you can set 'Option Strict On', which
666    eliminates the implicit calls to the unimplemented
667    Microsoft.VisualBasic.CompilerServices.ObjectType class.  
668    (Thanks to Jörg Rosenkranz.)
669
670    Managed Extensions for C++ is least likely to operate under Mono.  Mono
671    does not support mixed mode assemblies (that is, assemblies containing both
672    managed and unmanaged code, which Managed C++ can produce).  You need a
673    fully-managed assembly to run under Mono, and getting the Visual C++ .NET
674    compiler to generate such an executable can be difficult.  You need to use
675    only the .NET-framework assemblies, not the C libraries (you can't use
676    <b>printf</b>(3) for example.), and you need to use
677    the linker options <tt>/nodefaultlib /entry:main mscoree.lib</tt> in
678    addition to the <tt>/clr</tt> compiler flag.  You can still use certain
679    compiler intrinsic functions (such as <b>memcpy</b>(3)) and the STL.
680    You should also see <a 
681    href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vcmex/html/vcgrfconvertingmanagedextensionsforcprojectsfrommixed-modetopureil.asp"
682    >Converting Managed Extensions for C++ Projects from Mixed Mode to Pure
683    Intermediate Language</a> at MSDN.
684    Finally, you can use PEVERIFY.EXE from the .NET SDK to determine if the 
685    assembly is fully managed.
686
687    Thanks to Serge Chaban for the linker flags to use.
688
689 <a name="pnpproject"></a>
690 ** Mono and Portable.NET
691
692 Q: What are the differences between Mono and Portable.NET?
693
694 A: Most of Mono is being written using C#, with only
695    a few parts written in C (The JIT engine, the runtime, the
696    interfaces to the garbage collection system).  
697
698    It is easier to describe what is unique about Mono:
699    <ul>
700      <li> An advanced native-code compilation engine: Both
701           just-in-time compilation (JIT) and pre-compilation of CIL
702           bytecodes into native code are supported.
703
704      <li> A foundation for code optimization: The new code generator in
705           Mono builds on the experience of our first JIT engine, and enables
706           us to implement various advanced compiler optimization
707           tricks.  With an SSA-framework, plenty of new optimizations are possible. 
708
709           The current list of optimizations are: Peephole postpass,
710           Branch optimizations, Inline method calls, Constant folding, Constant
711           propagation, Copy propagation, Dead code elimination, Linear scan
712           global reg allocation, Conditional moves, Emit per-domain code,
713           Instruction scheduling, Intrinsic method implementations, Tail
714           recursion and tail calls, Loop related optimizations, Fast x86 FP
715           compares, Leaf procedures optimizations
716
717      <li> A self-hosting C# compiler written in C#, which is clean, easy
718           to maintain.
719
720      <li> Focus on the .NET Framework: we are tracking down the .NET
721           Framework API definition, as we believe it is the API people
722           will be most familiar with.
723
724      <li> A multi-platform runtime engine: both a JIT engine and an
725           interpreter exist.  The JIT engine runs currently on x86,
726           PowerPC Sparc and S390 systems, while the interpreter works on
727           x86, SPARC, StrongARM, s390 and PowerPC systems.  
728
729           The JIT engine is being ported to amd64 systems as of this
730           time. 
731
732      <li> Supports Linux, BSD, MacOS, Windows and Solaris at this point.
733
734      <li> The JIT engine is written using a portable instruction
735           selector which not only generates good code but
736           is also the foundation to re-target the JIT engine to other
737           systems.  
738
739      <li> Full support for remoting in the runtime.
740
741      <li> The C# compiler, the JIT engine and the class libraries are
742           mature enough that the whole system has been self-hosting
743           since April 2002.  This means that we develop Mono
744           completely with itself at this point.
745
746           By forcing ourselves to use our own code to develop our
747           tools, we bug fix problems rapidly, and the system is
748           overall more robust and tested than if we did not.
749
750      <li> Our class libraries are licensed under the terms of the MIT
751           X11 license which is a very liberal license as opposed to
752           the GNU GPL with exceptions, this means that Mono can be
753           used in places where the GPL with exceptions is not
754           permissible.
755
756      <li> Mono has a complete Web Services stack: we implement ASP.NET
757           web servers and web clients as well as implementing the
758           Remoting-based SOAP infrastructure.
759
760      <li> Remoting implementation: Mono has a complete remoting
761           infrastructure that is used in our own codebase to provide
762           added functionality and performance to our ASP.NET engine
763           and more.
764
765      <li> Mono has a complete <a href="c-sharp.html">C# 1.0</a>
766           implementation and has been stress tested a lot more than
767           Portable.NET's compiler.
768
769      <li> Mono's C# compiler has strong error handling and has closer
770           adherence to the specification with support for definite
771           assignment (required to generate verifiable IL code) and 
772           CLS conformance checking.
773
774      <li> Mono's C# compiler is written in C# which is easier for new
775           developers to come in and improve, fix and tune.  The Mono
776           C# compiler in C# is faster than their C-based compiler.
777
778      <li> Preview of C# 2.0: a work in progress for a 2.0
779           implementation of our compiler is available (iterators,
780           generics and anonymous methods are available in our
781           "preview" compiler).
782
783      <li> Mono has a complete Reflection and Reflection.Emit: these
784           are important for advanced applications, compilers and
785           dynamic code generation.
786
787      <li> Mono has a <a href="xml-classes.html">complete managed XML
788           stack</a>: XML, XPath, XML Serializer, XML Schema handling
789           are fully functional, feature complete and tuned for
790           performance.
791
792      <li> Mono has a <a href="crypto.html">complete cryptography stack
793           </a>: we implement the 1.0 and 1.1 APIs as well as using our
794           fully managed stack to implement the SSL/TLS transports. 
795
796      <li> <a href="ado-net.html">Extensive database support</a>: Mono
797           ships with database provides for <a
798           href="firebird.html">Firebird</a>, <a href="ibmdb2.html">IBM
799           DB2</a>, <a href="oracle.html">Oracle</a>, <a
800           href="sybase.html">Sybase</a>, Microsoft <a
801           href="tdsclient.html">SQL Server</a>, <a
802           href="sqlite.html">SQL Lite</a>, <a
803           href="mysql.html">MySQL</a>, <a
804           href="postgresql.html">PostgresSQL</A>, <a href="oledb.html">Ole
805           DB</a> and <a href="odbc.html">ODBC</a>.
806
807      <li> Mono includes full LDAP support.
808
809      <li> We have a great community of developers, without which Mono
810           would not be possible.
811    </ul>
812
813    In general, Mono is more mature and complete since it has been used
814    to develop itself, which is a big motivator for stability and
815    correctness, while Portable.NET remains pretty much an untested
816    platform.
817
818 Q: I hear Mono keeps changing the P/Invoke API, why?
819
820 A: We are just fixing our implementation to be compatible with the
821    Microsoft implementation.  In other words, the Mono P/Invoke API is
822    more complete when compared to the Portable.NET version, hence
823    various pieces of software that depend on this extended
824    functionality fail to work properly with Portable.NET.
825
826 <a name="webservices"></a>
827 ** Web Services
828
829 Q: How is Mono related to Web Services?
830
831 A: Mono is only related to Web Services in that it will implement the
832    same set of classes that have been authored in the .NET Framework
833    to simplify and streamline the process of building Web Services.
834
835    But most importantly, Mono is an Open Source implementation of the
836    .NET Framework.
837
838 Q: Can I author Web Services with Mono?
839
840 A: You will be able to write Web Services on .NET that run on Mono and
841    vice-versa. 
842
843 Q: If Mono implements the SDK classes, will I be able to write and
844    execute .NET Web Services with it?
845    
846 A: Yes.  When the project is finished, you will be able to use the
847    same technologies that are available through the .NET Framework SDK
848    on Windows to write Web Services.
849
850 Q: What about Soup?  Can I use Soup without Mono?
851
852 A: Soup is a library for GNOME applications to create SOAP servers and
853    SOAP clients, and can be used without Mono.  You can browse the
854    source code for soup using <a
855    href="http://cvs.gnome.org/bonsai/">GNOME's Bonsai</a>.
856
857 Q: Can I use CORBA?
858
859 A: Yes. The CLI contains enough information about a class that
860    exposing it to other RPC systems (like CORBA) is really simple, and
861    does not even require support from an object.  
862
863    <a href="http://remoting-corba.sourceforge.net/">Remoting.CORBA</a> is
864    a CORBA implementation that is gaining momentum.
865
866    Building an implementation of the Bonobo interfaces once this is ready
867    should be relatively simple. 
868
869 Q: Can I serialize my objects to other things other than XML?
870
871 A: Yes, although the serializing tools have not yet been planned, and
872    you would probably have to implement them yourself.
873
874 Q: Will Mono use ORBit?
875
876 A: There are a few advantages in using ORBit, like reusing existing code
877    and leveraging all the work done on it.  Michael Meeks has posted
878    a few <a href="http://lists.ximian.com/archives/public/mono-list/2002-September/008592.html">reasons</a>,
879    as well as some <a href="http://lists.ximian.com/archives/public/mono-list/2002-September/008657.html">ideas</a>
880    that could be used to reuse ORBit.
881
882    Most users are likely to choose a native .NET solution, like <a href="http://cvs.gnome.org/bonsai">Remoting.CORBA</a>
883
884
885 <a name="monodoc"></a>
886 ** MonoDoc
887
888 Q: What is MonoDoc?
889
890 A: MonoDoc is a graphical documentation browser for the Mono class
891    libraries. Currently, monodoc consists of a Gtk# application and is
892    in heavy development.
893
894 <a name="devel"></a>
895 ** Development Tools and Issues
896
897 Q: I am having trouble compiling a new version of Mono from CVS, it 
898    complains about my runtime being out of sync.
899
900 A: To upgrade your class libraries and compiler, see the 
901    INSTALL.txt in the MCS directory.
902
903    The single biggest source of confusion seems to be the "Your
904    runtime is out of sync" messages.  Realize that this is *normal*
905    while BUILDING.  Think about it: you're building a new class
906    library with the old runtime.  If the new class library references
907    a function that the old runtime knows nothing about, the runtime
908    system issues this warning.
909
910    Basically what needs to happen is for a new mono runtime to be
911    compiled, then the corlib class library be compiled, and once this
912    is done, install the new runtime, followed by corlib.
913
914    Once this is done, you can continue building your entire
915    environment.
916
917    For instance you just need to:
918    1.- Upgrade your Mono runtime (you might better do it with the 
919    mono-build.sh script available in the <a 
920    href="http://www.go-mono.com">download</a> page.
921    2.- Get the latest mono-lite tarball from the daily snapshots 
922    <a href="http://www.go-mono.com/daily/">page</a>, unzip and 
923    untar and copy all the dll files to your install path lib 
924    directory (typically pointed by the $MONO_PATH variable).
925    Copy all the exe files to the install path bin directory.
926    3.- Then checkout or update your mcs CVS copy. Then follow 
927    the steps described in mcs/INSTALL.txt.
928
929 Q: Will it be possible to use the CLI features without using byte codes or the JIT?
930
931 A: Yes. The CLI engine will be made available as a shared library.
932    The garbage collection engine, the threading abstraction, the
933    object system, the dynamic type code system and the JIT are
934    available for C developers to integrate with their applications if
935    they wish to do so. 
936
937 Q: Will you have new development tools?
938
939 A: With any luck, Free Software enthusiasts will contribute tools to
940    improve the developer environment.  These tools could be developed
941    initially using the Microsoft implementation of the CLI and then
942    executed later with Mono.
943
944    We are recommending people to use and contribute to existing
945    projects like SharpDevelop, Anjuta and Eclipse.
946
947 Q: What kind of rules make the Common Intermediate Language useful for
948    JITers?
949
950 A: The main rule is that the stack in the CLI is not a general purpose
951    stack.   You are not allowed to use it for other purposes than
952    computing values and passing arguments to functions or return
953    values.  
954
955    At any given call or return instruction, the types on the stack
956    have to be the same independently of the flow of execution of your
957    code. 
958
959 Q: Is it true that the CIL is ideal for JITing and not efficient for
960    interpreters?
961
962 A: The CIL is better suited to be JITed than JVM byte codes, but you
963    can interpret them as trivially as you can interpret JVM byte
964    codes. 
965
966 Q: Isn't it a little bit confusing to have the name of "XSP" (the same 
967    as in the Apache Project) for the ASP.NET support in Mono?.
968
969 A: In Mono, xsp is just the name of the C# code generator for ASP.NET 
970    pages. In the Apache Project, it is a term for the "eXtensible Server 
971    Pages" technology so as they are very different things, they don't 
972    conflict.
973
974 Q: Is there any plan to develop an aspx server for Mono?.
975
976 A: The XSP reference server is available and you can also use mod_mono
977    with Apache.
978
979 Q: Is there any way I can develop the class libraries using Linux yet?
980
981 A: Yes.  Mono has been self hosting since May 2002.
982
983 Q: Is there any way I can install a known working copy of mono in /usr, 
984    and an experimental copy somewhere else, and have both copies use 
985    their own libraries? (I'm still not very good at library paths in 
986    Linux)
987
988 A: Yes. Just use two installation prefixes.
989
990 Q: How should I write tests or a tests suite?
991
992 A: If you do a test suite for C#, you might want to keep it 
993    independent of the Mono C# compiler, so that other compiler 
994    implementations can later use it.  
995
996 Q: Would it be too terrible to have another corlib signed as mscorlib? 
997
998 A: We rename corlib to mscorlib also when saving the PE files, in fact, 
999    the runtime can execute program created by mono just fine.  
1000
1001 Q: Is it possible to build a C# file to some sort of intermediate format which 
1002    can linked into a final module, like the traditional .c -> .o -> .so path? 
1003    
1004 A: You can use: 
1005
1006         mcs /target:library file1.cs, mcs /target:library file2.cs, 
1007         mcs /target:exe file1.dll file2.dll /out:mybin.exe
1008
1009 Q: Is there any plans for implementing remoting in the near future?
1010
1011 A: The remoting infrastructure is in place.  We have implementations
1012    of the TcpChannel, HttpChannel and the Soap and Binary Formatters.
1013    They are compatible with .NET.
1014
1015    However, some classes from the library may have a different binary
1016    representation, because they may have a different internal data
1017    structure, so for example you won't be able to exchange a Hastable
1018    object between Mono and MS.NET. It should not be a problem if you
1019    are using primitive types, arrays or your own classes. In any case,
1020    could you post a test case?
1021
1022
1023 Q: My C code uses the __stdcall which is not availble on Linux, how can I
1024    make the code portable Windows/Unix across platforms?
1025
1026 A: Replace the __stdcall attribute with the STDCALL macro, and include this
1027    in your C code for newer gcc versions:
1028
1029         #ifndef STDCALL
1030         #define STDCALL __attribute__((stdcall))
1031         #endif
1032
1033 Q: I want to be able to execute Mono binaries, without having to use the "mono"
1034    command.  How can I do this?
1035
1036 A: From Carlos Perelló:
1037
1038    <i>I think that the best solution is the binfmt feature with the
1039    wrapper that exists with Debian packages at:
1040
1041    <a href="http://www.debianplanet.org/mono/dists/unstable/main/source/admin/">http://www.debianplanet.org/mono/dists/unstable/main/source/admin/</a>
1042
1043    If you want use it with Big endian machines, you should apply a patch
1044    (<a href="http://carlos.pemas.net/debian/mono/binfmt-detector-cli.c.diff">http://carlos.pemas.net/debian/mono/binfmt-detector-cli.c.diff</a>)
1045
1046    It works really good and lets you use wine also, it reads the .exe file
1047    headers and check if it's a .net executable.
1048
1049    This way you just execute: ./my-cool-mono-application.exe and it works
1050    without the need of any wrapper.</i>
1051
1052 Q: I see funny characters when I run programs, what is the problem?
1053
1054 A: (From Peter Williams and Gonzalo Paniagua):
1055
1056    This is Red Hat 9 (probably) using UTF8 on its console; the bytes are
1057    the UTF8 endianness markers.   You can do:
1058  
1059          LC_ALL=C mono myexe.exe
1060
1061    And they wont show up.
1062
1063    Alternatively, you can do:
1064
1065         $ echo -e "\033%G"
1066
1067    to enable UTF-8 on the console.
1068
1069 <a name="asp">
1070 ** Mono and ASP.NET
1071
1072 Q: Does Mono support ASP.NET?
1073
1074 A: Yes. 
1075
1076    Mono supports ASP.NET, we have shown an unmodified IBuySpy
1077    installation running on Mono as well as various other programs.  You can
1078    try it yourself downloading the XSP server. 
1079
1080 Q: Do I need install cygwin to work on ASP.NET in mono or Linux is enough since 
1081    it is self host right now.
1082
1083 A: Linux is enough.
1084
1085 Q: How can I run ASP.NET-based applications with Mono?
1086
1087 A: You need the Mono runtime and a hosting web server.  Currently we distribute a 
1088    small web server called `xsp' which is used to debug applications, or you can choose
1089    to use Daniel's Apache 2 module.
1090
1091 Q: Any plan to make ASP.NET in mono works with Apache in Linux?.
1092
1093 A: Daniel has authored an Apache2 Module for Mono that hosts the ASP.NET runtime
1094    and is available here: <a
1095    href="http://apacheworld.org/modmono/">http://apacheworld.org/modmono/</a>
1096
1097 Q: Will you support Apache 1?
1098
1099 A: Modules developed for Apache 2 are not compatible with Apache 1.3
1100    Daniel plans to support Apache 1.3 in the future but the current focus is on
1101    Apache 2, because of the better support for threading and Windows.
1102
1103 Q: Can I run Apache 1 and Apache 2 on the same machine?
1104
1105    You can always keep a copy of Apache 2 running in parallel with your Apache
1106    1.3 (either different port or using a reverse proxy).
1107
1108    You can also bind the two servers to different IP addresses on the
1109    same physical machine.
1110
1111 <a name="ado">
1112 ** Mono and ADO.NET
1113
1114 Q: What is the status of ADO.NET support?. Could I start migrating 
1115    applications from MS.NET to Mono?.
1116
1117 A: You could start right now using the ADO.NET support in mono, of course,
1118    if you want to help filling the missing gaps while you develop your app
1119    :-) Well, what I mean is that we're not that far to having full ADO.NET
1120    support in Mono, and we've got a lot of working things, so if we could
1121    get more help, we'd finish it really soon :-)
1122
1123 Q: In developing the data architecture for the application are there and
1124    objects I should stay away from in order to insure the smoothest possible
1125    transition (minimum code rewrite) to Mono's ADO.NET implementation?  (For
1126    example, strongly typed datasets versus untyped datasets, etc...)
1127
1128 A: We are implementing all the classes in Microsoft .NET's System.Data, so
1129    you can be sure that things will work the same in Mono as with the Microsoft
1130    implementation. 
1131
1132 Q: Does Mono can to connect to Sybase by using Mono.Data.*?
1133
1134 A: Yes. use Mono.Data.SybaseClient. First of all you have to create a
1135    SybaseConnection, and then, from it, use it as any other
1136    IDbConnection-based class.
1137
1138 <a name="java">
1139 ** Mono and Java
1140    
1141 Q: Why don't you use Java?  After all, there are many languages that
1142    target the Java VM.
1143
1144 A: You can get very good tools for doing Java development on free
1145    systems right now.  <a href="http://www.redhat.com">Red Hat</a> has
1146    contributed a <a href="http://gcc.gnu.org">GCC</a> <a
1147    href="http://gcc.gnu.org/java/">front-end for Java</a> that can take
1148    Java sources or Java byte codes and generate native executables; <a
1149    href="http://www.google.com/search?q=transvirtual">Transvirtual</a>
1150    implemented
1151    <a href="http://www.kaffe.org">Kaffe</a> a JIT engine for Java;
1152    Intel also has a Java VM called <a
1153    href="http://www.intel.com/research/mrl/orp/">ORP</a>.
1154
1155    The JVM is not designed to be a general purpose virtual machine.
1156    The Common Intermediate Language (CIL), on the other hand, is
1157    designed to be a target for a
1158    wide variety of programming languages, and has a set of rules
1159    designed to be optimal for JITers.
1160
1161 Q: Could Java target the CLI?
1162
1163 A: Yes, Java could target the CLI, Microsoft's J# compiler does that.
1164
1165    The <a href="http://weblog.ikvm.net/">IKVM</a> project builds a
1166    Java runtime that works on top of .NET and on top of Mono.  IKVM is
1167    essentially a JIT compiler that translates from JVM bytecodes into
1168    CIL instructions, and then lets the native JIT engine take over. 
1169
1170 Q: Is it possible to write a JVM byte code to CIL converter?
1171
1172 A: Yes, this is what <a href="http://weblog.ikvm.net">IKVM</a> does.
1173
1174 Q: Could mono become a hybrid CIL/java platform?
1175
1176 A: This can be obtained easily with IKVM.
1177
1178 Q: Do you plan to implement a Javascript compiler?
1179
1180 A: Yes.  The beginnings of the JScript compiler can be found on CVS.
1181    Cesar coordinates this effort.
1182
1183 Q: Can Mono or .NET share system classes (loaded from mscore.dll and other 
1184    libs) or will it behave like Sun's Java VM?
1185
1186 A: What you can do with mono is to load different applications in their own
1187    application domain: this is a feature of the CLR that allows sandboxing
1188    applications inside a single process space. This is usualy exploited to
1189    compartmentalize different parts of the same app, but it can also be
1190    effectively used to reduce the startup and memory overhead.
1191    Using different appdomains the runtime representation of types and
1192    methods is shared across applications.
1193
1194 <a name="extending"></a>
1195 ** Extending Mono
1196
1197 Q: Would you allow other classes other than those in the
1198    specification?
1199
1200 A: Yes.  The Microsoft class collection is very big, but it is by no
1201    means complete.  It would be nice to have a port of `Camel' (the
1202    Mail API used by Evolution inspired by Java Mail) for Mono
1203    applications.  
1204
1205    You might also want to look into implementing CORBA for Mono.  Not
1206    only because it would be useful, but because it sounds like a fun
1207    thing to do, given the fact that the CLI is such a type rich
1208    system. 
1209
1210    For more information on extending Mono, see our <a
1211    href="ideas.html">ideas</a> page.
1212
1213 Q: Do you plan to Embrace and Extend .NET?
1214
1215 A: Embracing a good technology is good.  Extending technologies in
1216    incompatible ways is bad for the users, so we do not plan on 
1217    making incompatible changes to the technologies.
1218
1219    If you have innovative ideas, and want to create new classes, we 
1220    encourage you to make those classes operate correctly well in both
1221    Mono and .NET.
1222
1223    Today Mono ships with a number of extra libraries that were
1224    developed either by members of the Mono community, or other
1225    groups.  
1226
1227    In some cases, we have found the bits from Microsoft to be
1228    incomplete, but we avoid breaking the API, instead we expose the
1229    missing functionality in new assemblies (See Mono.Security and
1230    System.Security).
1231
1232 Q: Is there any way I can develop the class libraries using Linux yet?
1233
1234 A: Yes.  Mono has been selfhosting since March 2002. 
1235
1236 Q: Is there any way I can install a known working copy of mono in /usr, 
1237    and an experimental copy somewhere else, and have both copies use 
1238    their own libraries? (I'm still not very good at library paths in 
1239    Linux)
1240
1241 A: Yes. Just use two installation prefixes.
1242
1243
1244 <a name="portability"></a>
1245 ** Portability
1246
1247 Q: Will Mono only work on Linux?
1248
1249 A: Currently, we are doing our work on Linux-based systems and
1250    Windows.  We do not expect many Linux-isms in the code, so it
1251    should be easy to port Mono to other UNIX variants.   
1252
1253 Q: What about Mono on non Linux-based systems?
1254
1255 A: Our main intention at Ximian is to be able to develop GNOME
1256    applications with Mono, but if you are interested in providing a
1257    port of the Winforms classes to other platforms (frame buffer or
1258    MacOS X for example), we would gladly integrate them, as long
1259    they are under an open source license.  
1260
1261 Q: What operating systems/CPUs do you support
1262
1263 A: Mono currently runs on Linux, Windows, Solaris, FreeBSD, HP-UX and
1264    MacOS X.
1265
1266    There is a JIT engine available for x86 processors that can
1267    generate code and optimizations tailored for a particular CPU.
1268
1269    Interpreters exist for the SPARC v8, SPARC v9, Itanium, HP-PA,
1270    PowerPC and StrongARM CPUs.
1271
1272 Q: Does Mono run on Windows?
1273
1274 A: Yes.   You can get pre-compiled
1275    binaries from <a href="http://www.go-mono.com/download.html">http://www.go-mono.com/download.html</a>
1276
1277 Q: Does Mono run on Linux?
1278
1279 A: Yes.  You can get pre-compiled
1280    binaries from <a href="http://www.go-mono.com/download.html">http://www.go-mono.com/download.html</a>
1281
1282 Q: Will I require Cygwin to run mono?
1283
1284 A: No.  Cygwin is only required to build Mono.
1285
1286 Q: Will Mono depend on GNOME?
1287
1288 A: It will depend only if you are using a particular assembly (for
1289    example, for doing GUI applications).  If you are just interested
1290    in Mono for implementing a `Hello World Enterprise P2P Web
1291    Service', you will not need any GNOME components.
1292
1293 Q: Do you plan to port Rhino to C#?.
1294
1295 A: Eto Demerzal has started a Rhino port to C#.
1296
1297 Q: Has anyone succeeded in building a Mac version of the C# environment. 
1298    If so can you explain how?  
1299
1300 A: Yes, Mono works on Linux/PPC and MacOS X (10.2 and 10.3)
1301
1302 <a name="reuse"></a>
1303 ** Reusing Existing Code
1304
1305 Q: What projects will you reuse or build upon?
1306
1307 A: We want to get Mono in the hands of programmers soon.  We are
1308    interested in reusing existing open source software.
1309
1310 Q: Will I be able to use Microsoft SQL Server 2000 or will I need to switch
1311    to a specific Open Source Database. Will I need to recode?
1312
1313 A: There is no need to rewrite your code as long as you keep using
1314    Microsoft SQL Server.  If you want to use an open source database,
1315    you might need to make changes to your code.
1316
1317 Q: What do I need to watch out for when programming in VB.NET so that I'm
1318    sure to be able to run those apps on Linux?
1319
1320 A: Not making any P/Invoke or DLL calls should and not using anything in
1321    the Microsoft.* namespaces should suffice. Also do not use any 
1322    Methods/Classes marked as "This type/method supports the .NET Framework 
1323    infrastructure and is not intended to be used directly from your code." 
1324    even if you know what these classes/methods do.
1325
1326 Q: Will built-in reporting be supported for crystal reports? This is a
1327    heavily used part of our system.
1328
1329 A: . Crystal Reports are propriety. Someone may try to emulate
1330    the behavior, but no-one has yet volunteered.
1331
1332 Q: Who about writing to the registry? As I understand it, Linux does not have
1333    a counterpart to the registry. Should I avoid relying on that feature?
1334
1335 A: Try to avoid it. Although there would be a emulation for registry in
1336    Mono too. GNOME does have a registry like mechanism for configuration. But
1337    Even if gnome has a configuration system similar to the registry, the keys 
1338    will not be equal, so you will probably end up having to do some runtime 
1339    detection, and depending on this load an assembly that has your 
1340    platform-specific hacks.
1341
1342 Q: System.Data.SqlClient with FreeTDS, will you port parts of these to C# and 
1343    use them?
1344
1345 A: This has been done.
1346
1347 <a name="gcc"></a>
1348 ** Mono and GCC
1349
1350 Q: Are you working on a GCC front-end to C#? 
1351
1352 A: We are not working on a GCC front-end for C#
1353
1354 Q: Will you support C/C++ on the Mono VM?
1355
1356 A:The open64 compiler effort from SGI helps a lot in this direction.
1357
1358    The Open64 compiler is a modified version of GCC that
1359    generates a new intermediate language instead of RTL.  This could be
1360    the foundation to generate CIL code, and to implement the upcoming
1361    Managed extensions to C++ from ECMA.
1362
1363    Open64 (and other derivative forks of GCC) split the gcc front-ends
1364    from the backends by using the WHIRL intermediate representation.  
1365    Kris has begun the implementation of a translator from WHIRL to CIL.
1366
1367    So it will be possible to use the GCC compilers to target the CIL.
1368
1369 Q: What about Managed C++?
1370
1371 A: Once a full translator for WHIRL exists, we are interested in
1372    looking at expanding the GCC frontends to include extensions for
1373    Managed C++.
1374
1375 Q: What about making a front-end to GCC that takes CIL images and
1376    generates native code?
1377
1378 A: There is no active work on this area, but Mono already provides
1379    pre-compilation services (Ahead-of-Time compilation).
1380
1381
1382 <a name="performance"></a>
1383 ** Performance
1384
1385 Q: How fast will Mono be?
1386
1387 A: We can not predict the future, but a conservative estimate is that
1388    it would be at least `as fast as other JIT engines'.
1389
1390    Mono's JIT engine has been recently re-architected, and it provides
1391    many new features, and layers suitable for optimization.  It is
1392    relatively easy to add new optimizations to Mono. 
1393
1394    The CIL has some advantages over the Java byte code: The existance
1395    of structs in addition to classes helps a lot the performance and
1396    minimizes the memory footprint of applications.
1397
1398    Generics in the CLI world are first-class citizens, they are not
1399    just a strong-typing addition to the language.  The generic
1400    specifications are embedded into the instruction stream, the JIT
1401    uses this information to JIT a unique instances of a method that is
1402    optimized for the type arguments.
1403
1404    The CIL is really an intermediate representation and there are a
1405    number of restrictions on how you can emit CIL code that simplify
1406    creating better JIT engines.
1407
1408    For example, on the CIL, the stack is not really an abstraction
1409    available for the code generator to use at will.  Rather, it is a
1410    way of creating a postfix representation of the parsed tree.  At
1411    any given call point or return point, the contents of the stack are
1412    expected to contain the same object types independently of how the
1413    instruction was reached.
1414
1415 <a name="licensing"></a>
1416 ** Licensing
1417
1418 Q: Will I be able to write proprietary applications that run with
1419    Mono?
1420
1421 A: Yes.  The licensing scheme is planned to allow proprietary
1422    developers to write applications with Mono.
1423    
1424 Q: What license or licenses are you using for the Mono Project?
1425
1426 A: The C# Compiler is released under the terms of the <a 
1427    href="http://www.opensource.org/licenses/gpl-license.html">GNU GPL</a>.  The runtime
1428    libraries are under the <a
1429    href="http://www.opensource.org/licenses/lgpl-license.html">GNU
1430    Library GPL</a>.  And the class libraries are released
1431    under the terms of the <a
1432    href="http://www.opensource.org/licenses/mit-license.html">MIT X11</a>
1433    license.
1434
1435    The Mono runtime and the Mono C# Compiler are also available under
1436    a proprietary license for those who can not use the LGPL and the
1437    GPL in their code.  
1438
1439    For licensing details, contact <a
1440    href="mailto:mono-licensing@ximian.com">mono-licensing@ximian.com</a>
1441
1442
1443 Q: I would like to contribute code to Mono under a particular
1444    license. What licenses will you accept?
1445
1446 A: We will have to evaluate the licenses for compatibility first,
1447    but as a general rule, we will accept the code under the same
1448    terms of the "container" module. 
1449
1450 <a name="patents"></a>
1451 ** Patents
1452
1453 Q: Could patents be used to completely disable Mono (either submarine
1454    patents filed now, or changes made by Microsoft specifically to
1455    create patent problems)?
1456
1457 A: First some background information.
1458
1459    The .NET Framework is divided in two parts: the ECMA/ISO covered
1460    technologies and the other technologies developed on top of it like
1461    ADO.NET, ASP.NET and Windows.Forms.
1462
1463    Mono implements the ECMA/ISO covered parts, as well as being a
1464    project that aims to implement the higher level blocks like
1465    ASP.NET, ADO.NET and Windows.Forms.  
1466
1467    The Mono project has gone beyond both of those components and has
1468    developed and integrated third party class libraries, the most
1469    important being: Debugging APIs, integration with the Gnome
1470    platform (Accessibility, Pango rendering, Gdk/Gtk, Glade, GnomeUI),
1471    Mozilla, OpenGL, extensive database support (Microsoft only
1472    supports a couple of providers out of the box, while Mono has
1473    support for 11 different providers), our POSIX integration
1474    libraries and finally the embedded API (used to add scripting to
1475    applications and host the CLI, or for example as an embedded
1476    runtime in Apache). 
1477
1478    The core of the .NET Framework, and what has been patented by
1479    Microsoft falls under the ECMA/ISO submission.  Jim Miller at
1480    Microsoft has made a statement on the patents covering ISO/ECMA,
1481    (he is one of the inventors listed in the patent): <a
1482    href="http://web.archive.org/web/20030609164123/http://mailserver.di.unipi.it/pipermail/dotnet-sscli/msg00218.html">here</a>.
1483
1484    Basically a grant is given to anyone who want to implement those
1485    components for free and for any purpose.
1486
1487    The controversial elements are the ASP.NET, ADO.NET and
1488    Windows.Forms subsets.  Those are convenient for people who need
1489    full compatibility with the Windows platform, but are not required
1490    for the open source Mono platform, nor integration with today's
1491    Mono's rich support of Linux. 
1492
1493    The Mono strategy for dealing with these technologies is as
1494    follows: (1) work around the patent by using a different
1495    implementation technique that retains the API, but changes the
1496    mechanism; if that is not possible, we would (2) remove the pieces
1497    of code that were covered by those patents, and also (3) find prior
1498    art that would render the patent useless.
1499  
1500    Not providing a patented capability would weaken the
1501    interoperability, but it would still provide the free software /
1502    open source software community with good development tools, which
1503    is the primary reason for developing Mono.  
1504
1505    The patents do not apply in countries where software patents are
1506    not allowed.
1507
1508    For Linux server and desktop development, we only need the ECMA
1509    components, and things that we have developed (like Gtk#) or Apache
1510    integration.  
1511
1512 Q: Is Mono only an implementation of the .NET Framework?
1513
1514 A: Mono implements both the .NET Framework, as well as plenty of class
1515    libraries that are either Unix specific, <a
1516    href="http://www.gnome.org">Gnome</a> specific, or that are not
1517    part of the .NET Framework but people find useful. 
1518
1519    The following map shows the relationship between the components:
1520
1521    <img src="http://primates.ximian.com/~miguel/tmp/map.png">
1522
1523 <a name="obfuscation"></a>
1524 ** Obfuscation
1525
1526 Q: Are there any obfuscation programs for Mono/Linux?
1527
1528 A: We are not aware of these, but some from Windows might work.
1529
1530 Q: What could I do to avoid people decompiling my program?
1531
1532 A: You can use the bundle functionality in Mono. 
1533
1534    This would bundle your binary inside a Mono runtime instance, so
1535    you distribute a single executable that contains the code inside.
1536    Notice that for this to work and be practical, you need to get a
1537    commercial license to the Mono runtime.
1538
1539    The reason is that the bundle functionality is covered by the LGPL:
1540    so you would have to distribute your assemblies separatedly to allow
1541    developers to relink mono which would defeat the purpose of bundling
1542    for obscuring your code.
1543
1544    It is not impossible to break, just like any other obfuscators.
1545
1546    That being said, value these days does not lie in particular
1547    tiny routines, but lies in the large body of work, and if someone
1548    steals your code, you are likely going to find out anyways.
1549
1550 Q: Any other option?
1551
1552 A: You could precompile with --aot your code, then disassemble the
1553    original .exe, and remove all the code, then re-assemble and ship
1554    both the vessel .exe and the precompiled code.  
1555
1556    This is not a supported configuration of Mono, and you would be 
1557    on your own in terms of dealing with bugs and problems here.
1558
1559    Get the companies that build the obfuscation packages to read 
1560    the ECMA spec and fix the bugs in their products that generate 
1561    non-standard binaries (or, if they expose a bug in mono, please
1562    file a report in our bugzilla).  
1563
1564    Pay Ximian/Novell to spend the development time needed to get mono
1565    to support the broken binaries that some of the obfuscation
1566    packages generate (or contribute that support).
1567
1568 <a name="etc"></a> 
1569 ** Miscellaneous Questions
1570
1571 Q: You say that the CLI allows multiple languages to execute on the
1572    same environment.  Isn't this the purpose of CORBA?
1573
1574 A: The key difference between CORBA (and COM) and the CLI is that the
1575    CLI allows "data-level interoperability" because every
1576    language/component uses the same data layout and memory management.
1577
1578    This means you can operate directly upon the data types that someone
1579    else provides, without having to go via their interfaces.  It also
1580    means you don't have to "marshal" (convert) parameters (data
1581    layouts are the same, so you can just pass components directly) and
1582    you don't have to worry about memory management, because all
1583    languages/components share the same garbage collector and address
1584    space.  This means much less copying and no need for reference
1585    counting.
1586
1587 Q: Will you support COM?
1588
1589 A: The runtime will support XPCOM on Unix systems and COM on Windows.
1590    Most of the code for dynamic trampolines exists already.
1591
1592 Q: Will Ximian offer certifications on Mono or related technologies?. 
1593
1594 A: It's possible. But there is no plan about this. So the short answer is no.
1595
1596 Q: How can I report a bug?
1597
1598 A: The best thing is to track down the bug and provide a simple test
1599    to reproduce the bug.  You can then add the bug to our bug tracking
1600    system.  You can use our <a href="bugs.html">Bug Form</a> to enter
1601    bugs for the appropriate component.
1602
1603    Please provide information about what version of mono you're using
1604    and any relevant details to be able to reproduce the bug. Note that
1605    bugs reported on the mailing-list may be easily forgotten, so it's
1606    better to file them in the <a href="http://bugzilla.ximian.com/enter_bug.cgi">bug tracking system</a>.
1607
1608 Q: Does mcs support the same command line options as the MS C# 
1609    compiler?
1610
1611 A: The Mono C# compiler now supports the same command line
1612    arguments as the Microsoft C# compiler does.
1613
1614 Q: How about getting searchable archives on lists.ximian.com? 
1615
1616 A: You can perform a search on the mono-related mailing lists 
1617    <a href="http://www.go-mono.com/mailing-lists.html">here</a>.
1618
1619 Q: When using mono from cvs or from a snapshot, I get an error messaage
1620    saying that Mono and the runtime are out of sync. How do I fix that?
1621
1622 A: If you use mono from cvs, you need to be prepared for changes in the
1623    runtime internals. This means that you should keep a working setup 
1624    before blindling updating (a working setup may just be the last released
1625    tarball or a recent binary snapshot).
1626    Usually, compiling corlib with mcs before recompiling the C runtime does
1627    the right thing (but occasionally you may need to do it the other 
1628    way around).
1629
1630 Q: Why are you going for a GtkHtml implementation?
1631
1632 A: GtkHTML is just a lightweight HTML rendering engine that does not
1633    support CSS, so we need it to look decent for those of us that will 
1634    be using the documentation in our day-to-day work on Linux. The 
1635    Web-based interfaces lack the agility that you get from a native GUI
1636    tool to browse your documentation. Probably later on, we will write 
1637    scripts and generate a full documentation set that is web-browsable, 
1638    but we need a command-line and GUI tools that we can use natively on 
1639    Linux when disconnected from the Web (and that has better 
1640    interactions than a web page).
1641
1642 Q: Is there a command-line tool that allows me to access .NET interactively?
1643
1644 A: There are several but one that is free software and uses MCS is the one
1645    Dennis Lu from Rice University is working on; a REPL C# interpreter.
1646
1647 Q: Is it possible to use Visual C++ with Mono?.
1648
1649 A: It's possible to run VC++ generated apps under Mono, but we do not
1650    provide a Manager C++ compiler ourselves.
1651
1652 Q: Does Mono support generics?.
1653
1654 A: Yes, the Mono runtime now supports the new Generics extensions, and
1655    there is also support for generics in our new compiler: `gmcs'.
1656
1657    The Mono C# 1.0 compiler (mcs) will ship with various C# 2.0
1658    features, but generics will remain on the separate compiler (gmcs)
1659    as this code is not as tested as the main compiler.
1660
1661 <a name="problems"></a>
1662 ** Mono Common Problems
1663
1664    If you are having problems compiling or running Mono software
1665    or if you think that you found a bug, etc. Please visit the
1666    <a href="http://monoevo.sf.net/mono-common-problems.html">Mono Common Problems</a> document and try there. 
1667
1668 ** Credits
1669
1670    The FAQ contains material contributed by Miguel de Icaza, Jaime Anguiano, Lluis Sánchez.