2004-04-09 Zoltan Varga <vargaz@freemail.hu>
[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 Novell be 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 and Sparc systems, while the interpreter works on
727           x86, SPARC, StrongARM, s390 and PowerPC systems.  
728
729           The JIT engine is being ported to PowerPC, s390, SPARC and
730           amd64 systems as of this 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.
771
772      <li> Mono's C# compiler is written in C# which is easier for new
773           developers to come in and improve, fix and tune.  The Mono
774           C# compiler in C# is faster than their C-based compiler.
775
776      <li> Preview of C# 2.0: a work in progress for a 2.0
777           implementation of our compiler is available (iterators,
778           generics and anonymous methods are available in our
779           "preview" compiler).
780
781      <li> Mono has a complete Reflection and Reflection.Emit: these
782           are important for advanced applications, compilers and
783           dynamic code generation.
784
785      <li> Mono has a <a href="xml-classes">complete managed XML
786           stack</a>: XML, XPath, XML Serializer, XML Schema handling
787           are fully functional, feature complete and tuned for
788           performance.
789
790      <li> Mono has a complete cryptography stack: we have a complete
791           crypto stack: we implement the 1.0 and 1.1 APIs as well as
792           using our fully managed stack to implement the SSL/TLS
793           transports. 
794
795      <li> <a href="ado-net.html">Extensive database support</a>: Mono
796           ships with database provides for <a
797           href="firebird.html">Firebird</a>, <a href="ibmdb2.html">IBM
798           DB2</a>, <a href="oracle.html">Oracle</a>, <a
799           href="sybase.html">Sybase</a>, Microsoft <a
800           href="tdsclient.html">SQL Server</a>, <a
801           href="sqlite.html">SQL Lite</a>, <a
802           href="mysql.html">MySQL</a>, <a
803           href="postgresql">PostgresSQL</A>, <a href="oledb.html">Ole
804           DB</a> and <a href="odbc.html">ODBC</a>.
805
806      <li> Mono includes full LDAP support.
807
808      <li> We have a great community of developers, without which Mono
809           would not be possible.
810    </ul>
811
812    In general, Mono is more mature and complete since it has been used
813    to develop itself, which is a big motivator for stability and
814    correctness, while Portable.NET remains pretty much an untested
815    platform.
816
817 Q: I hear Mono keeps changing the P/Invoke API, why?
818
819 A: We are just fixing our implementation to be compatible with the
820    Microsoft implementation.  In other words, the Mono P/Invoke API is
821    more complete when compared to the Portable.NET version, hence
822    various pieces of software that depend on this extended
823    functionality fail to work properly with Portable.NET.
824
825 <a name="webservices"></a>
826 ** Web Services
827
828 Q: How is Mono related to Web Services?
829
830 A: Mono is only related to Web Services in that it will implement the
831    same set of classes that have been authored in the .NET Framework
832    to simplify and streamline the process of building Web Services.
833
834    But most importantly, Mono is an Open Source implementation of the
835    .NET Framework.
836
837 Q: Can I author Web Services with Mono?
838
839 A: You will be able to write Web Services on .NET that run on Mono and
840    vice-versa. 
841
842 Q: If Mono implements the SDK classes, will I be able to write and
843    execute .NET Web Services with it?
844    
845 A: Yes.  When the project is finished, you will be able to use the
846    same technologies that are available through the .NET Framework SDK
847    on Windows to write Web Services.
848
849 Q: What about Soup?  Can I use Soup without Mono?
850
851 A: Soup is a library for GNOME applications to create SOAP servers and
852    SOAP clients, and can be used without Mono.  You can browse the
853    source code for soup using <a
854    href="http://cvs.gnome.org/bonsai/">GNOME's Bonsai</a>.
855
856 Q: Can I use CORBA?
857
858 A: Yes. The CLI contains enough information about a class that
859    exposing it to other RPC systems (like CORBA) is really simple, and
860    does not even require support from an object.  
861
862    <a href="http://remoting-corba.sourceforge.net/">Remoting.CORBA</a> is
863    a CORBA implementation that is gaining momentum.
864
865    Building an implementation of the Bonobo interfaces once this is ready
866    should be relatively simple. 
867
868 Q: Can I serialize my objects to other things other than XML?
869
870 A: Yes, although the serializing tools have not yet been planned, and
871    you would probably have to implement them yourself.
872
873 Q: Will Mono use ORBit?
874
875 A: There are a few advantages in using ORBit, like reusing existing code
876    and leveraging all the work done on it.  Michael Meeks has posted
877    a few <a href="http://lists.ximian.com/archives/public/mono-list/2002-September/008592.html">reasons</a>,
878    as well as some <a href="http://lists.ximian.com/archives/public/mono-list/2002-September/008657.html">ideas</a>
879    that could be used to reuse ORBit.
880
881    Most users are likely to choose a native .NET solution, like <a href="http://cvs.gnome.org/bonsai">Remoting.CORBA</a>
882
883
884 <a name="monodoc"></a>
885 ** MonoDoc
886
887 Q: What is MonoDoc?
888
889 A: MonoDoc is a graphical documentation browser for the Mono class
890    libraries. Currently, monodoc consists of a Gtk# application and is
891    in heavy development.
892
893 <a name="devel"></a>
894 ** Development Tools and Issues
895
896 Q: I am having trouble compiling a new version of Mono from CVS, it 
897    complains about my runtime being out of sync.
898
899 A: To upgrade your class libraries and compiler, see the 
900    INSTALL.txt in the MCS directory.
901
902    The single biggest source of confusion seems to be the "Your
903    runtime is out of sync" messages.  Realize that this is *normal*
904    while BUILDING.  Think about it: you're building a new class
905    library with the old runtime.  If the new class library references
906    a function that the old runtime knows nothing about, the runtime
907    system issues this warning.
908
909    Basically what needs to happen is for a new mono runtime to be
910    compiled, then the corlib class library be compiled, and once this
911    is done, install the new runtime, followed by corlib.
912
913    Once this is done, you can continue building your entire
914    environment.
915
916    For instance you just need to:
917    1.- Upgrade your Mono runtime (you might better do it with the 
918    mono-build.sh script available in the <a 
919    href="http://www.go-mono.com">download</a> page.
920    2.- Get the latest mono-lite tarball from the daily snapshots 
921    <a href="http://www.go-mono.com/daily/">page</a>, unzip and 
922    untar and copy all the dll files to your install path lib 
923    directory (typically pointed by the $MONO_PATH variable).
924    Copy all the exe files to the install path bin directory.
925    3.- Then checkout or update your mcs CVS copy. Then follow 
926    the steps described in mcs/INSTALL.txt.
927
928 Q: Will it be possible to use the CLI features without using byte codes or the JIT?
929
930 A: Yes. The CLI engine will be made available as a shared library.
931    The garbage collection engine, the threading abstraction, the
932    object system, the dynamic type code system and the JIT are
933    available for C developers to integrate with their applications if
934    they wish to do so. 
935
936 Q: Will you have new development tools?
937
938 A: With any luck, Free Software enthusiasts will contribute tools to
939    improve the developer environment.  These tools could be developed
940    initially using the Microsoft implementation of the CLI and then
941    executed later with Mono.
942
943    We are recommending people to use and contribute to existing
944    projects like SharpDevelop, Anjuta and Eclipse.
945
946 Q: What kind of rules make the Common Intermediate Language useful for
947    JITers?
948
949 A: The main rule is that the stack in the CLI is not a general purpose
950    stack.   You are not allowed to use it for other purposes than
951    computing values and passing arguments to functions or return
952    values.  
953
954    At any given call or return instruction, the types on the stack
955    have to be the same independently of the flow of execution of your
956    code. 
957
958 Q: Is it true that the CIL is ideal for JITing and not efficient for
959    interpreters?
960
961 A: The CIL is better suited to be JITed than JVM byte codes, but you
962    can interpret them as trivially as you can interpret JVM byte
963    codes. 
964
965 Q: Isn't it a little bit confusing to have the name of "XSP" (the same 
966    as in the Apache Project) for the ASP.NET support in Mono?.
967
968 A: In Mono, xsp is just the name of the C# code generator for ASP.NET 
969    pages. In the Apache Project, it is a term for the "eXtensible Server 
970    Pages" technology so as they are very different things, they don't 
971    conflict.
972
973 Q: Is there any plan to develop an aspx server for Mono?.
974
975 A: The XSP reference server is available and you can also use mod_mono
976    with Apache.
977
978 Q: Is there any way I can develop the class libraries using Linux yet?
979
980 A: Yes.  Mono has been self hosting since May 2002.
981
982 Q: Is there any way I can install a known working copy of mono in /usr, 
983    and an experimental copy somewhere else, and have both copies use 
984    their own libraries? (I'm still not very good at library paths in 
985    Linux)
986
987 A: Yes. Just use two installation prefixes.
988
989 Q: How should I write tests or a tests suite?
990
991 A: If you do a test suite for C#, you might want to keep it 
992    independent of the Mono C# compiler, so that other compiler 
993    implementations can later use it.  
994
995 Q: Would it be too terrible to have another corlib signed as mscorlib? 
996
997 A: We rename corlib to mscorlib also when saving the PE files, in fact, 
998    the runtime can execute program created by mono just fine.  
999
1000 Q: Is it possible to build a C# file to some sort of intermediate format which 
1001    can linked into a final module, like the traditional .c -> .o -> .so path? 
1002    
1003 A: You can use: 
1004
1005         mcs /target:library file1.cs, mcs /target:library file2.cs, 
1006         mcs /target:exe file1.dll file2.dll /out:mybin.exe
1007
1008 Q: Is there any plans for implementing remoting in the near future?
1009
1010 A: The remoting infrastructure is in place.  We have implementations
1011    of the TcpChannel, HttpChannel and the Soap and Binary Formatters.
1012    They are compatible with .NET.
1013
1014    However, some classes from the library may have a different binary
1015    representation, because they may have a different internal data
1016    structure, so for example you won't be able to exchange a Hastable
1017    object between Mono and MS.NET. It should not be a problem if you
1018    are using primitive types, arrays or your own classes. In any case,
1019    could you post a test case?
1020
1021
1022 Q: My C code uses the __stdcall which is not availble on Linux, how can I
1023    make the code portable Windows/Unix across platforms?
1024
1025 A: Replace the __stdcall attribute with the STDCALL macro, and include this
1026    in your C code for newer gcc versions:
1027
1028         #ifndef STDCALL
1029         #define STDCALL __attribute__((stdcall))
1030         #endif
1031
1032 Q: I want to be able to execute Mono binaries, without having to use the "mono"
1033    command.  How can I do this?
1034
1035 A: From Carlos Perelló:
1036
1037    <i>I think that the best solution is the binfmt feature with the
1038    wrapper that exists with Debian packages at:
1039
1040    <a href="http://www.debianplanet.org/mono/dists/unstable/main/source/admin/">http://www.debianplanet.org/mono/dists/unstable/main/source/admin/</a>
1041
1042    If you want use it with Big endian machines, you should apply a patch
1043    (<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>)
1044
1045    It works really good and lets you use wine also, it reads the .exe file
1046    headers and check if it's a .net executable.
1047
1048    This way you just execute: ./my-cool-mono-application.exe and it works
1049    without the need of any wrapper.</i>
1050
1051 Q: I see funny characters when I run programs, what is the problem?
1052
1053 A: (From Peter Williams and Gonzalo Paniagua):
1054
1055    This is Red Hat 9 (probably) using UTF8 on its console; the bytes are
1056    the UTF8 endianness markers.   You can do:
1057  
1058          LC_ALL=C mono myexe.exe
1059
1060    And they wont show up.
1061
1062    Alternatively, you can do:
1063
1064         $ echo -e "\033%G"
1065
1066    to enable UTF-8 on the console.
1067
1068 <a name="asp">
1069 ** Mono and ASP.NET
1070
1071 Q: Does Mono support ASP.NET?
1072
1073 A: Yes. 
1074
1075    Mono supports ASP.NET, we have shown an unmodified IBuySpy
1076    installation running on Mono as well as various other programs.  You can
1077    try it yourself downloading the XSP server. 
1078
1079 Q: Do I need install cygwin to work on ASP.NET in mono or Linux is enough since 
1080    it is self host right now.
1081
1082 A: Linux is enough.
1083
1084 Q: How can I run ASP.NET-based applications with Mono?
1085
1086 A: You need the Mono runtime and a hosting web server.  Currently we distribute a 
1087    small web server called `xsp' which is used to debug applications, or you can choose
1088    to use Daniel's Apache 2 module.
1089
1090 Q: Any plan to make ASP.NET in mono works with Apache in Linux?.
1091
1092 A: Daniel has authored an Apache2 Module for Mono that hosts the ASP.NET runtime
1093    and is available here: <a
1094    href="http://apacheworld.org/modmono/">http://apacheworld.org/modmono/</a>
1095
1096 Q: Will you support Apache 1?
1097
1098 A: Modules developed for Apache 2 are not compatible with Apache 1.3
1099    Daniel plans to support Apache 1.3 in the future but the current focus is on
1100    Apache 2, because of the better support for threading and Windows.
1101
1102 Q: Can I run Apache 1 and Apache 2 on the same machine?
1103
1104    You can always keep a copy of Apache 2 running in parallel with your Apache
1105    1.3 (either different port or using a reverse proxy).
1106
1107    You can also bind the two servers to different IP addresses on the
1108    same physical machine.
1109
1110 <a name="ado">
1111 ** Mono and ADO.NET
1112
1113 Q: What is the status of ADO.NET support?. Could I start migrating 
1114    applications from MS.NET to Mono?.
1115
1116 A: You could start right now using the ADO.NET support in mono, of course,
1117    if you want to help filling the missing gaps while you develop your app
1118    :-) Well, what I mean is that we're not that far to having full ADO.NET
1119    support in Mono, and we've got a lot of working things, so if we could
1120    get more help, we'd finish it really soon :-)
1121
1122 Q: In developing the data architecture for the application are there and
1123    objects I should stay away from in order to insure the smoothest possible
1124    transition (minimum code rewrite) to Mono's ADO.NET implementation?  (For
1125    example, strongly typed datasets versus untyped datasets, etc...)
1126
1127 A: We are implementing all the classes in Microsoft .NET's System.Data, so
1128    you can be sure that things will work the same in Mono as with the Microsoft
1129    implementation. 
1130
1131 Q: Does Mono can to connect to Sybase by using Mono.Data.*?
1132
1133 A: Yes. use Mono.Data.SybaseClient. First of all you have to create a
1134    SybaseConnection, and then, from it, use it as any other
1135    IDbConnection-based class.
1136
1137 <a name="java">
1138 ** Mono and Java
1139    
1140 Q: Why don't you use Java?  After all, there are many languages that
1141    target the Java VM.
1142
1143 A: You can get very good tools for doing Java development on free
1144    systems right now.  <a href="http://www.redhat.com">Red Hat</a> has
1145    contributed a <a href="http://gcc.gnu.org">GCC</a> <a
1146    href="http://gcc.gnu.org/java/">front-end for Java</a> that can take
1147    Java sources or Java byte codes and generate native executables; <a
1148    href="http://www.google.com/search?q=transvirtual">Transvirtual</a>
1149    implemented
1150    <a href="http://www.kaffe.org">Kaffe</a> a JIT engine for Java;
1151    Intel also has a Java VM called <a
1152    href="http://www.intel.com/research/mrl/orp/">ORP</a>.
1153
1154    The JVM is not designed to be a general purpose virtual machine.
1155    The Common Intermediate Language (CIL), on the other hand, is
1156    designed to be a target for a
1157    wide variety of programming languages, and has a set of rules
1158    designed to be optimal for JITers.
1159
1160 Q: Could Java target the CLI?
1161
1162 A: Yes, Java could target the CLI, Microsoft's J# compiler does that.
1163
1164    The <a href="http://weblog.ikvm.net/">IKVM</a> project builds a
1165    Java runtime that works on top of .NET and on top of Mono.  IKVM is
1166    essentially a JIT compiler that translates from JVM bytecodes into
1167    CIL instructions, and then lets the native JIT engine take over. 
1168
1169 Q: Is it possible to write a JVM byte code to CIL converter?
1170
1171 A: Yes, this is what <a href="http://weblog.ikvm.net">IKVM</a> does.
1172
1173 Q: Could mono become a hybrid CIL/java platform?
1174
1175 A: This can be obtained easily with IKVM.
1176
1177 Q: Do you plan to implement a Javascript compiler?
1178
1179 A: Yes.  The beginnings of the JScript compiler can be found on CVS.
1180    Cesar coordinates this effort.
1181
1182 Q: Can Mono or .NET share system classes (loaded from mscore.dll and other 
1183    libs) or will it behave like Sun's Java VM?
1184
1185 A: What you can do with mono is to load different applications in their own
1186    application domain: this is a feature of the CLR that allows sandboxing
1187    applications inside a single process space. This is usualy exploited to
1188    compartmentalize different parts of the same app, but it can also be
1189    effectively used to reduce the startup and memory overhead.
1190    Using different appdomains the runtime representation of types and
1191    methods is shared across applications.
1192
1193 <a name="extending"></a>
1194 ** Extending Mono
1195
1196 Q: Would you allow other classes other than those in the
1197    specification?
1198
1199 A: Yes.  The Microsoft class collection is very big, but it is by no
1200    means complete.  It would be nice to have a port of `Camel' (the
1201    Mail API used by Evolution inspired by Java Mail) for Mono
1202    applications.  
1203
1204    You might also want to look into implementing CORBA for Mono.  Not
1205    only because it would be useful, but because it sounds like a fun
1206    thing to do, given the fact that the CLI is such a type rich
1207    system. 
1208
1209    For more information on extending Mono, see our <a
1210    href="ideas.html">ideas</a> page.
1211
1212 Q: Do you plan to Embrace and Extend .NET?
1213
1214 A: Embracing a good technology is good.  Extending technologies in
1215    incompatible ways is bad for the users, so we do not plan on 
1216    making incompatible changes to the technologies.
1217
1218    If you have innovative ideas, and want to create new classes, we 
1219    encourage you to make those classes operate correctly well in both
1220    Mono and .NET.
1221
1222    Today Mono ships with a number of extra libraries that were
1223    developed either by members of the Mono community, or other
1224    groups.  
1225
1226    In some cases, we have found the bits from Microsoft to be
1227    incomplete, but we avoid breaking the API, instead we expose the
1228    missing functionality in new assemblies (See Mono.Security and
1229    System.Security).
1230
1231 Q: Is there any way I can develop the class libraries using Linux yet?
1232
1233 A: Yes.  Mono has been selfhosting since March 2002. 
1234
1235 Q: Is there any way I can install a known working copy of mono in /usr, 
1236    and an experimental copy somewhere else, and have both copies use 
1237    their own libraries? (I'm still not very good at library paths in 
1238    Linux)
1239
1240 A: Yes. Just use two installation prefixes.
1241
1242
1243 <a name="portability"></a>
1244 ** Portability
1245
1246 Q: Will Mono only work on Linux?
1247
1248 A: Currently, we are doing our work on Linux-based systems and
1249    Windows.  We do not expect many Linux-isms in the code, so it
1250    should be easy to port Mono to other UNIX variants.   
1251
1252 Q: What about Mono on non Linux-based systems?
1253
1254 A: Our main intention at Ximian is to be able to develop GNOME
1255    applications with Mono, but if you are interested in providing a
1256    port of the Winforms classes to other platforms (frame buffer or
1257    MacOS X for example), we would gladly integrate them, as long
1258    they are under an open source license.  
1259
1260 Q: What operating systems/CPUs do you support
1261
1262 A: Mono currently runs on Linux, Windows, Solaris, FreeBSD, HP-UX and
1263    MacOS X.
1264
1265    There is a JIT engine available for x86 processors that can
1266    generate code and optimizations tailored for a particular CPU.
1267
1268    Interpreters exist for the SPARC v8, SPARC v9, Itanium, HP-PA,
1269    PowerPC and StrongARM CPUs.
1270
1271 Q: Does Mono run on Windows?
1272
1273 A: Yes.   You can get pre-compiled
1274    binaries from <a href="http://www.go-mono.com/download.html">http://www.go-mono.com/download.html</a>
1275
1276 Q: Does Mono run on Linux?
1277
1278 A: Yes.  You can get pre-compiled
1279    binaries from <a href="http://www.go-mono.com/download.html">http://www.go-mono.com/download.html</a>
1280
1281 Q: Will I require Cygwin to run mono?
1282
1283 A: No.  Cygwin is only required to build Mono.
1284
1285 Q: Will Mono depend on GNOME?
1286
1287 A: It will depend only if you are using a particular assembly (for
1288    example, for doing GUI applications).  If you are just interested
1289    in Mono for implementing a `Hello World Enterprise P2P Web
1290    Service', you will not need any GNOME components.
1291
1292 Q: Do you plan to port Rhino to C#?.
1293
1294 A: Eto Demerzal has started a Rhino port to C#.
1295
1296 Q: Has anyone succeeded in building a Mac version of the C# environment. 
1297    If so can you explain how?  
1298
1299 A: Yes, Mono works on Linux/PPC and MacOS X (10.2 and 10.3)
1300
1301 <a name="reuse"></a>
1302 ** Reusing Existing Code
1303
1304 Q: What projects will you reuse or build upon?
1305
1306 A: We want to get Mono in the hands of programmers soon.  We are
1307    interested in reusing existing open source software.
1308
1309 Q: Will I be able to use Microsoft SQL Server 2000 or will I need to switch
1310    to a specific Open Source Database. Will I need to recode?
1311
1312 A: There is no need to rewrite your code as long as you keep using
1313    Microsoft SQL Server.  If you want to use an open source database,
1314    you might need to make changes to your code.
1315
1316 Q: What do I need to watch out for when programming in VB.NET so that I'm
1317    sure to be able to run those apps on Linux?
1318
1319 A: Not making any P/Invoke or DLL calls should and not using anything in
1320    the Microsoft.* namespaces should suffice. Also do not use any 
1321    Methods/Classes marked as "This type/method supports the .NET Framework 
1322    infrastructure and is not intended to be used directly from your code." 
1323    even if you know what these classes/methods do.
1324
1325 Q: Will built-in reporting be supported for crystal reports? This is a
1326    heavily used part of our system.
1327
1328 A: . Crystal Reports are propriety. Someone may try to emulate
1329    the behavior, but no-one has yet volunteered.
1330
1331 Q: Who about writing to the registry? As I understand it, Linux does not have
1332    a counterpart to the registry. Should I avoid relying on that feature?
1333
1334 A: Try to avoid it. Although there would be a emulation for registry in
1335    Mono too. GNOME does have a registry like mechanism for configuration. But
1336    Even if gnome has a configuration system similar to the registry, the keys 
1337    will not be equal, so you will probably end up having to do some runtime 
1338    detection, and depending on this load an assembly that has your 
1339    platform-specific hacks.
1340
1341 Q: System.Data.SqlClient with FreeTDS, will you port parts of these to C# and 
1342    use them?
1343
1344 A: This has been done.
1345
1346 <a name="gcc"></a>
1347 ** Mono and GCC
1348
1349 Q: Are you working on a GCC front-end to C#? A GCC back-end that will
1350    generate CIL images? 
1351
1352 A: We would love to see a GCC modification that would generate CIL
1353    images, but there is nothing at this point.
1354
1355 Q: What about making a front-end to GCC that takes CIL images and
1356    generates native code?
1357
1358 A: There is no active work on this area, but Mono already provides
1359    pre-compilation services (Ahead-of-Time compilation).
1360
1361 Q: But would this work around the GPL in the GCC compiler and allow
1362    people to work on non-free front-ends?
1363
1364 A: People can already do this by targeting the JVM byte codes (there
1365    are about 130 compilers for various languages that target the JVM).
1366
1367 <a name="performance"></a>
1368 ** Performance
1369
1370 Q: How fast will Mono be?
1371
1372 A: We can not predict the future, but a conservative estimate is that
1373    it would be at least `as fast as other JIT engines'.
1374
1375    Mono's JIT engine has been recently re-architected, and it provides
1376    many new features, and layers suitable for optimization.  It is
1377    relatively easy to add new optimizations to Mono. 
1378
1379    The CIL has some advantages over the Java byte code: The existance
1380    of structs in addition to classes helps a lot the performance and
1381    minimizes the memory footprint of applications.
1382
1383    Generics in the CLI world are first-class citizens, they are not
1384    just a strong-typing addition to the language.  The generic
1385    specifications are embedded into the instruction stream, the JIT
1386    uses this information to JIT a unique instances of a method that is
1387    optimized for the type arguments.
1388
1389    The CIL is really an intermediate representation and there are a
1390    number of restrictions on how you can emit CIL code that simplify
1391    creating better JIT engines.
1392
1393    For example, on the CIL, the stack is not really an abstraction
1394    available for the code generator to use at will.  Rather, it is a
1395    way of creating a postfix representation of the parsed tree.  At
1396    any given call point or return point, the contents of the stack are
1397    expected to contain the same object types independently of how the
1398    instruction was reached.
1399
1400 <a name="licensing"></a>
1401 ** Licensing
1402
1403 Q: Will I be able to write proprietary applications that run with
1404    Mono?
1405
1406 A: Yes.  The licensing scheme is planned to allow proprietary
1407    developers to write applications with Mono.
1408    
1409 Q: What license or licenses are you using for the Mono Project?
1410
1411 A: The C# Compiler is released under the terms of the <a 
1412    href="http://www.opensource.org/licenses/gpl-license.html">GNU GPL</a>.  The runtime
1413    libraries are under the <a
1414    href="http://www.opensource.org/licenses/lgpl-license.html">GNU
1415    Library GPL</a>.  And the class libraries are released
1416    under the terms of the <a
1417    href="http://www.opensource.org/licenses/mit-license.html">MIT X11</a>
1418    license.
1419
1420    The Mono runtime and the Mono C# Compiler are also available under
1421    a proprietary license for those who can not use the LGPL and the
1422    GPL in their code.  
1423
1424    For licensing details, contact <a
1425    href="mailto:mono-licensing@ximian.com">mono-licensing@ximian.com</a>
1426
1427
1428 Q: I would like to contribute code to Mono under a particular
1429    license. What licenses will you accept?
1430
1431 A: We will have to evaluate the licenses for compatibility first,
1432    but as a general rule, we will accept the code under the same
1433    terms of the "container" module. 
1434
1435 <a name="patents"></a>
1436 ** Patents
1437
1438 Q: Could patents be used to completely disable Mono (either submarine
1439    patents filed now, or changes made by Microsoft specifically to
1440    create patent problems)?
1441
1442 A: First some background information.
1443
1444    The .NET Framework is divided in two parts: the ECMA/ISO covered
1445    technologies and the other technologies developed on top of it like
1446    ADO.NET, ASP.NET and Windows.Forms.
1447
1448    Mono implements the ECMA/ISO covered parts, as well as being a
1449    project that aims to implement the higher level blocks like
1450    ASP.NET, ADO.NET and Windows.Forms.  
1451
1452    The Mono project has gone beyond both of those components and has
1453    developed and integrated third party class libraries, the most
1454    important being: Debugging APIs, integration with the Gnome
1455    platform (Accessibility, Pango rendering, Gdk/Gtk, Glade, GnomeUI),
1456    Mozilla, OpenGL, extensive database support (Microsoft only
1457    supports a couple of providers out of the box, while Mono has
1458    support for 11 different providers), our POSIX integration
1459    libraries and finally the embedded API (used to add scripting to
1460    applications and host the CLI, or for example as an embedded
1461    runtime in Apache). 
1462
1463    The core of the .NET Framework, and what has been patented by
1464    Microsoft falls under the ECMA/ISO submission.  Jim Miller at
1465    Microsoft has made a statement on the patents covering ISO/ECMA,
1466    (he is one of the inventors listed in the patent): <a
1467    href="https://mailserver.di.unipi.it/pipermail/dotnet-sscli/msg00218.html">here</a>.
1468
1469    Basically a grant is given to anyone who want to implement those
1470    components for free and for any purpose.
1471
1472    The controversial elements are the ASP.NET, ADO.NET and
1473    Windows.Forms subsets.  Those are convenient for people who need
1474    full compatibility with the Windows platform, but are not required
1475    for the open source Mono platform, nor integration with today's
1476    Mono's rich support of Linux. 
1477
1478    The Mono strategy for dealing with these technologies is as
1479    follows: (1) work around the patent by using a different
1480    implementation technique that retains the API, but changes the
1481    mechanism; if that is not possible, we would (2) remove the pieces
1482    of code that were covered by those patents, and also (3) find prior
1483    art that would render the patent useless.
1484  
1485    Not providing a patented capability would weaken the
1486    interoperability, but it would still provide the free software /
1487    open source software community with good development tools, which
1488    is the primary reason for developing Mono.  
1489
1490    The patents do not apply in countries where software patents are
1491    not allowed.
1492
1493    For Linux server and desktop development, we only need the ECMA
1494    components, and things that we have developed (like Gtk#) or Apache
1495    integration.  
1496
1497 Q: Is Mono only an implementation of the .NET Framework?
1498
1499 A: Mono implements both the .NET Framework, as well as plenty of class
1500    libraries that are either Unix specific, <a
1501    href="http://www.gnome.org">Gnome</a> specific, or that are not
1502    part of the .NET Framework but people find useful. 
1503
1504    The following map shows the relationship between the components:
1505
1506    <img src="http://primates.ximian.com/~miguel/tmp/map.png">
1507
1508 <a name="obfuscation"></a>
1509 ** Obfuscation
1510
1511 Q: Are there any obfuscation programs for Mono/Linux?
1512
1513 A: We are not aware of these, but some from Windows might work.
1514
1515 Q: What could I do to avoid people decompiling my program?
1516
1517 A: You can use the bundle functionality in Mono. 
1518
1519    This would bundle your binary inside a Mono runtime instance, so
1520    you distribute a single executable that contains the code inside.
1521    Notice that for this to work and be practical, you need to get a
1522    commercial license to the Mono runtime.
1523
1524    The reason is that the bundle functionality is covered by the LGPL:
1525    so you would have to distribute your assemblies separatedly to allow
1526    developers to relink mono which would defeat the purpose of bundling
1527    for obscuring your code.
1528
1529    It is not impossible to break, just like any other obfuscators.
1530
1531    That being said, value these days does not lie in particular
1532    tiny routines, but lies in the large body of work, and if someone
1533    steals your code, you are likely going to find out anyways.
1534
1535 Q: Any other option?
1536
1537 A: You could precompile with --aot your code, then disassemble the
1538    original .exe, and remove all the code, then re-assemble and ship
1539    both the vessel .exe and the precompiled code.  
1540
1541    This is not a supported configuration of Mono, and you would be 
1542    on your own in terms of dealing with bugs and problems here.
1543
1544    Get the companies that build the obfuscation packages to read 
1545    the ECMA spec and fix the bugs in their products that generate 
1546    non-standard binaries (or, if they expose a bug in mono, please
1547    file a report in our bugzilla).  
1548
1549    Pay Ximian/Novell to spend the development time needed to get mono
1550    to support the broken binaries that some of the obfuscation
1551    packages generate (or contribute that support).
1552
1553 <a name="etc"></a> 
1554 ** Miscellaneous Questions
1555
1556 Q: You say that the CLI allows multiple languages to execute on the
1557    same environment.  Isn't this the purpose of CORBA?
1558
1559 A: The key difference between CORBA (and COM) and the CLI is that the
1560    CLI allows "data-level interoperability" because every
1561    language/component uses the same data layout and memory management.
1562
1563    This means you can operate directly upon the data types that someone
1564    else provides, without having to go via their interfaces.  It also
1565    means you don't have to "marshal" (convert) parameters (data
1566    layouts are the same, so you can just pass components directly) and
1567    you don't have to worry about memory management, because all
1568    languages/components share the same garbage collector and address
1569    space.  This means much less copying and no need for reference
1570    counting.
1571
1572 Q: Will you support COM?
1573
1574 A: The runtime will support XPCOM on Unix systems and COM on Windows.
1575    Most of the code for dynamic trampolines exists already.
1576
1577 Q: Will Ximian offer certifications on Mono or related technologies?. 
1578
1579 A: It's possible. But there is no plan about this. So the short answer is no.
1580
1581 Q: How can I report a bug?
1582
1583 A: The best thing is to track down the bug and provide a simple test
1584    to reproduce the bug.  You can then add the bug to our bug tracking
1585    system.  You can use our <a href="bugs.html">Bug Form</a> to enter
1586    bugs for the appropriate component.
1587
1588    Please provide information about what version of mono you're using
1589    and any relevant details to be able to reproduce the bug. Note that
1590    bugs reported on the mailing-list may be easily forgotten, so it's
1591    better to file them in the <a href="http://bugzilla.ximian.com/enter_bug.cgi">bug tracking system</a>.
1592
1593 Q: Does mcs support the same command line options as the MS C# 
1594    compiler?
1595
1596 A: The Mono C# compiler now supports the same command line
1597    arguments as the Microsoft C# compiler does.
1598
1599 Q: How about getting searchable archives on lists.ximian.com? 
1600
1601 A: You can perform a search on the mono-related mailing lists 
1602    <a href="http://www.go-mono.com/mailing-lists.html">here</a>.
1603
1604 Q: When using mono from cvs or from a snapshot, I get an error messaage
1605    saying that Mono and the runtime are out of sync. How do I fix that?
1606
1607 A: If you use mono from cvs, you need to be prepared for changes in the
1608    runtime internals. This means that you should keep a working setup 
1609    before blindling updating (a working setup may just be the last released
1610    tarball or a recent binary snapshot).
1611    Usually, compiling corlib with mcs before recompiling the C runtime does
1612    the right thing (but occasionally you may need to do it the other 
1613    way around).
1614
1615 Q: Why are you going for a GtkHtml implementation?
1616
1617 A: GtkHTML is just a lightweight HTML rendering engine that does not
1618    support CSS, so we need it to look decent for those of us that will 
1619    be using the documentation in our day-to-day work on Linux. The 
1620    Web-based interfaces lack the agility that you get from a native GUI
1621    tool to browse your documentation. Probably later on, we will write 
1622    scripts and generate a full documentation set that is web-browsable, 
1623    but we need a command-line and GUI tools that we can use natively on 
1624    Linux when disconnected from the Web (and that has better 
1625    interactions than a web page).
1626
1627 Q: Is there a command-line tool that allows me to access .NET interactively?
1628
1629 A: There are several but one that is free software and uses MCS is the one
1630    Dennis Lu from Rice University is working on; a REPL C# interpreter.
1631
1632 Q: Is it possible to use Visual C++ with Mono?.
1633
1634 A: It's possible to run VC++ generated apps under Mono, but we do not
1635    provide a Manager C++ compiler ourselves.
1636
1637 Q: Does Mono support generics?.
1638
1639 A: Mono doesn't support generics currently but a lot of work is being 
1640    done towards it.
1641
1642 <a name="problems"></a>
1643 ** Mono Common Problems
1644
1645    If you are having problems compiling or running Mono software
1646    or if you think that you found a bug, etc. Please visit the
1647    <a href="http://monoevo.sf.net/mono-common-problems.html">Mono Common Problems</a> document and try there. 
1648
1649 ** Credits
1650
1651    The FAQ contains material contributed by Miguel de Icaza, Jaime Anguiano, Lluis Sánchez.