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>
27 href="http://www.monohispano.org/tutoriales/mono-puf//">Spanish
28 translation</a> is also available (it is outdated though)
33 Q: What is Mono exactly?
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.
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:
52 href="http://remoting-corba.sourceforge.net/">Remoting.CORBA</a>: A
53 CORBA implementation for Mono.
55 <li>Ginzu: An implementation on top of Remoting for the <a
56 href="http://www.zeroc.com">ICE</a> stack
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.
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).
67 <li>GlGen (available from the Mono CVS): Bindings for OpenGL.
69 <li>Mono.LDAP: LDAP access for .NET apps.
71 <li>Mono.Data: We ship support for Postgress, MySql, Sybase,
72 DB2, SqlLite, Tds (SQL server protocol) and Oracle databases.
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).
78 <li>Mono.Posix: Bindings for building POSIX applications using
81 <li>Mono.Http: Support for creating custom, embedded HTTP
82 servers and common HTTP handlers for your applications.
85 Q: What is the difference between Mono and the .NET Initiative?
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.
93 Q: What technologies are included in Mono?
95 A: Mono contains a number of components useful for building new
99 * A Common Language Infrastructure (CLI) virtual
100 machine that contains a class loader, Just-in-time
101 compiler, and a garbage collecting runtime.
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
108 * A compiler for the C# language. In the future we
109 might work on other compilers that target the Common
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.
120 The CLR and the Common Type System (CTS) enables applications and
121 libraries to be written in a collection of different languages that
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.
129 A single object system, threading system, class libraries, and
130 garbage collection system can be shared across all these languages.
132 Q: Where can I find the specification for these technologies?
134 A: You can find the information here:
137 C# <a href="http://www.ecma.ch/ecma1/STAND/ecma-334.htm">http://www.ecma.ch/ecma1/STAND/ecma-334.htm</a>
139 CLI <a href="http://www.ecma.ch/ecma1/STAND/ecma-335.htm">http://www.ecma.ch/ecma1/STAND/ecma-335.htm</a>
141 Q: Will you implement the .NET Framework SDK class libraries?
143 A: Yes, we will be implementing the APIs of the .NET Framework SDK
146 Q: Will you offer an ECMA-compliant set of class libraries?
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.
152 Q: What does the name "Mono" mean?
154 A: Mono is the word for `monkey' in Spanish. We like monkeys.
156 Q: Does Mono work today?
158 A: The execution engine works on various platforms, we support
159 Just-in-Time and Ahead-of-Time compilations on Intel x86 machines
162 The class libraries are mature enough to run various real
163 applications: our C# compiler, ASP.NET, and Gtk#-based
166 Q: When will you ship Mono?
168 A: Please see the <a href="mono-roadmap.html">Mono Roadmap</a> for
169 more details on the release plans.
171 Q: How can I contribute?
173 A: Check the <a href="contributing.html">contributing</a> section.
175 Q: Aren't you just copying someone else's work?
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.
182 For more background, read the <a href="http://www.go-mono.com/rationale.html">Mono
183 Project white paper</a>.
186 Q: Miguel said once that Mono was being implemented in COBOL. Is that true?.
188 A: No. It was a joke.
191 <a name="novell"></a>
193 ** The Novell Role in the Mono Project
195 Q: Why is Novell working on .NET?
197 A: Novell is interested in providing the best tools for programmers to
198 develop applications for Free Operating Systems.
200 For more information, read the project <a
201 href="rationale.html">rationale</a> page.
203 Q: Will Novell be able to take on a project of this size?
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.
210 Q: What pieces is Novell working on?
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
218 Q: Will Novell offer Mono commercially?
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,
224 href="mailto:mono-licensing@ximian.com">mono-licensing@ximian.com</a>
226 Q: Does Novell provide consulting services around Mono?
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.
234 href="mailto:mono-licensing@ximian.com">mono-licensing@ximian.com</a>
235 for consulting services information.
237 Q: Will you wait until Mono is finished?
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
246 Q: How is Mono related to GNOME?
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
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.
259 Q: Has the GNOME Foundation or the GNOME team adopted Mono?
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
266 Q: Should GNOME programmers switch over to Mono now?
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.
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.
276 Q: Will Mono include compatibility with Bonobo components? What is the
277 relationship between Mono and Bonobo?
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.
284 Q: Does Mono depend on GNOME?
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.
290 Q: But will I be able to build GNOME applications?
292 A: Yes, we will enable people to write GNOME applications using Mono.
294 Q: Do you have C# bindings for GNOME?.
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.
304 Q: Will Mono enable GUI applications to be authored?
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.
310 Q: What is the difference between Gtk# and System.Windows.Forms?
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.
317 Q: What are you using to implement Windows.Forms?
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.
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
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
333 Q: Why not implement System.Windows.Forms on top of Gtk# or Qt#?
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.
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.
349 To achieve full compatibility, we would have to emulate this, and
350 it would take too long.
352 For more details see the <a href="winforms.html">winforms page</a>
354 Q: Wine applications do not look like native applications, what are
355 you going to do about this?
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.
362 Q: Will I be able to run my smart clients on systems powered by Mono?
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.
368 Q: Where can I learn more about Gtk#?
370 A: The following <a href="http://gtk-sharp.sourceforge.net">link</a> sends you to the page of the project.
372 Q: What can I do with Gtk#?.
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.
378 Q: How can I compile my HelloWorld.cs which uses Gtk#?.
380 A: Try: mcs -r:gtk-sharp HelloWorld.cs
382 Q: Is there any way how to connect DataAdapter to some GTK# controls?
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.
393 Q: Do you have an estimate for when Windows.Forms will be released?
395 A: The plan currently is aimed at Q4/2004.
398 Q: Do you have a comparission chart about the various toolkit
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>.
405 ** Mono and Microsoft
407 Q: Is Microsoft helping Ximian with this project?
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.
414 Microsoft is interested in other implementations of .NET and are
415 willing to help make the ECMA spec more accurate for this purpose.
417 Ximian was also invited to participate in the ECMA committee
418 meetings for C# and the CLI.
420 Q: Are Microsoft or Corel paying Ximian to do this?
424 Q: Do you fear that Microsoft will change the spec and render Mono
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.
431 Even if changes happened in the platform which were undocumented,
432 the existing platform would a value on its own.
434 Q: Are you writing Mono from the ECMA specs?
436 A: Yes, we are writing them from the ECMA specs and the published
437 materials in print about .NET.
439 Q: If my applications use Mono, will I have to pay a service fee?
441 A: No. Mono is not related to Microsoft's initiative of
442 software-as-a-service.
444 Q: Is the Mono Project is related to the Microsoft Hailstorm effort? Is
445 Ximian endorsing Hailstorm?
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
453 Q: Will Mono or .NET applications depend on Microsoft Passport?
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).
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?
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.
468 This is what we call <a
469 href="http://www.gnu.org/philosophy/free-sw.html">Free Software</a>
471 Q: Is Mono a free implementation of Passport?
473 A: No. Mono is just a runtime, a compiler and a set of class
476 Q: Will the System.Web.Security.PassportIdentity class mean
477 that my software will depend on Passport?
479 A: No. Applications may use that API to contact a Passport site, but
480 are not required to do so.
482 As long as your application does not use Passport, you will not
485 Q: Will Mono running on Linux make Passport available for Linux?
487 A: No. However, the Passport toolkit for Linux-based web servers is
488 available from Microsoft.
490 Q: Will Mono allow me to run Microsoft Office on Linux?
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>.
496 Q: Can mono run the WebMatrix?
498 A: No. That requires System.Windows.Forms support which is not
499 currently implemented.
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?
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.
509 <a name="platforms"></a>
512 Q: What operating systems does Mono run on?
514 A: Mono is known to run on Linux, Unix and Windows systems.
516 Q: Can I run Mono applications without using `mono program.exe'?
518 A: Yes, this is possible on Linux systems, to do this, use something like:
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
526 if [ -e /proc/sys/fs/binfmt_misc/register ]; then
527 echo ':CLR:M::MZ::/usr/bin/mono:' > /proc/sys/fs/binfmt_misc/register
529 echo "No binfmt_misc support"
534 Q: What architectures does Mono support?
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).
540 There is also an interpreter, which is slower that runs on the
541 s390, SPARC, HPPA, StrongARM and PowerPC architectures.
543 Q: Can Mono run on Windows 9x, or ME editions?
545 A: Mono requires Unicode versions of Win32 APIs to run,
546 and only a handful of *W functions is supported under Win9x.
548 There is Microsoft Layer for Unicode that provides implementation
549 of these APIs on 9x systems.
551 Unfortunately it uses linker trick for delayed load that is not
552 supported by ld, so some sort of adapter is necessary.
554 You will need MSLU and one of the following libs to link Mono to
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".
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.
564 Q: Why support Windows, when you can run the real thing?
566 A: There are various reasons:
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.
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.
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.
585 <a name="compatibility"></a>
588 Q: Can Mono run applications developed with the Microsoft.NET framework?
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.
595 Q: Will missing API entry points be implemented?
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).
601 Q: If the behavior of an API call is different, will you fix it?
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.
609 Q: Can I develop my applications on Windows, and deploy on a supported
610 Mono platform (like Linux)?
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.
618 Q: Will applications run out the box with Mono?
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.
624 Q: What is a 100% .NET application?
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.
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.
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
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.
645 Q: Can I execute my Visual Studio .NET program (Visual Basic .NET, Visual C#,
646 Managed Extensions for C++, etc.) under Mono?
648 A: Yes, with some reservations.
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.)
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.
659 With regards to languages, C# applications tend to be most portable.
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.)
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.
687 Thanks to Serge Chaban for the linker flags to use.
689 <a name="pnpproject"></a>
690 ** Mono and Portable.NET
692 Q: What are the differences between Mono and Portable.NET?
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).
698 It is easier to describe what is unique about Mono:
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.
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.
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
717 <li> A self-hosting C# compiler written in C#, which is clean, easy
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.
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.
729 The JIT engine is being ported to amd64 systems as of this
732 <li> Supports Linux, BSD, MacOS, Windows and Solaris at this point.
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
739 <li> Full support for remoting in the runtime.
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.
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.
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
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.
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
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.
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.
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.
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
783 <li> Mono has a complete Reflection and Reflection.Emit: these
784 are important for advanced applications, compilers and
785 dynamic code generation.
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
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.
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>.
807 <li> Mono includes full LDAP support.
809 <li> We have a great community of developers, without which Mono
810 would not be possible.
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
818 Q: I hear Mono keeps changing the P/Invoke API, why?
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.
826 <a name="webservices"></a>
829 Q: How is Mono related to Web Services?
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.
835 But most importantly, Mono is an Open Source implementation of the
838 Q: Can I author Web Services with Mono?
840 A: You will be able to write Web Services on .NET that run on Mono and
843 Q: If Mono implements the SDK classes, will I be able to write and
844 execute .NET Web Services with it?
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.
850 Q: What about Soup? Can I use Soup without Mono?
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>.
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.
863 <a href="http://remoting-corba.sourceforge.net/">Remoting.CORBA</a> is
864 a CORBA implementation that is gaining momentum.
866 Building an implementation of the Bonobo interfaces once this is ready
867 should be relatively simple.
869 Q: Can I serialize my objects to other things other than XML?
871 A: Yes, although the serializing tools have not yet been planned, and
872 you would probably have to implement them yourself.
874 Q: Will Mono use ORBit?
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.
882 Most users are likely to choose a native .NET solution, like <a href="http://cvs.gnome.org/bonsai">Remoting.CORBA</a>
885 <a name="monodoc"></a>
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.
895 ** Development Tools and Issues
897 Q: I am having trouble compiling a new version of Mono from CVS, it
898 complains about my runtime being out of sync.
900 A: To upgrade your class libraries and compiler, see the
901 INSTALL.txt in the MCS directory.
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.
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.
914 Once this is done, you can continue building your entire
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.
929 Q: Will it be possible to use the CLI features without using byte codes or the JIT?
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
937 Q: Will you have new development tools?
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.
944 We are recommending people to use and contribute to existing
945 projects like SharpDevelop, Anjuta and Eclipse.
947 Q: What kind of rules make the Common Intermediate Language useful for
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
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
959 Q: Is it true that the CIL is ideal for JITing and not efficient for
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
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?.
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
974 Q: Is there any plan to develop an aspx server for Mono?.
976 A: The XSP reference server is available and you can also use mod_mono
979 Q: Is there any way I can develop the class libraries using Linux yet?
981 A: Yes. Mono has been self hosting since May 2002.
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
988 A: Yes. Just use two installation prefixes.
990 Q: How should I write tests or a tests suite?
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.
996 Q: Would it be too terrible to have another corlib signed as mscorlib?
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.
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?
1006 mcs /target:library file1.cs, mcs /target:library file2.cs,
1007 mcs /target:exe file1.dll file2.dll /out:mybin.exe
1009 Q: Is there any plans for implementing remoting in the near future?
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.
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?
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?
1026 A: Replace the __stdcall attribute with the STDCALL macro, and include this
1027 in your C code for newer gcc versions:
1030 #define STDCALL __attribute__((stdcall))
1033 Q: I want to be able to execute Mono binaries, without having to use the "mono"
1034 command. How can I do this?
1036 A: From Carlos Perelló:
1038 <i>I think that the best solution is the binfmt feature with the
1039 wrapper that exists with Debian packages at:
1041 <a href="http://www.debianplanet.org/mono/dists/unstable/main/source/admin/">http://www.debianplanet.org/mono/dists/unstable/main/source/admin/</a>
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>)
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.
1049 This way you just execute: ./my-cool-mono-application.exe and it works
1050 without the need of any wrapper.</i>
1052 Q: I see funny characters when I run programs, what is the problem?
1054 A: (From Peter Williams and Gonzalo Paniagua):
1056 This is Red Hat 9 (probably) using UTF8 on its console; the bytes are
1057 the UTF8 endianness markers. You can do:
1059 LC_ALL=C mono myexe.exe
1061 And they wont show up.
1063 Alternatively, you can do:
1067 to enable UTF-8 on the console.
1072 Q: Does Mono support ASP.NET?
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.
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.
1085 Q: How can I run ASP.NET-based applications with Mono?
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.
1091 Q: Any plan to make ASP.NET in mono works with Apache in Linux?.
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>
1097 Q: Will you support Apache 1?
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.
1103 Q: Can I run Apache 1 and Apache 2 on the same machine?
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).
1108 You can also bind the two servers to different IP addresses on the
1109 same physical machine.
1114 Q: What is the status of ADO.NET support?. Could I start migrating
1115 applications from MS.NET to Mono?.
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 :-)
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...)
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
1132 Q: Does Mono can to connect to Sybase by using Mono.Data.*?
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.
1141 Q: Why don't you use Java? After all, there are many languages that
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>
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>.
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.
1161 Q: Could Java target the CLI?
1163 A: Yes, Java could target the CLI, Microsoft's J# compiler does that.
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.
1170 Q: Is it possible to write a JVM byte code to CIL converter?
1172 A: Yes, this is what <a href="http://weblog.ikvm.net">IKVM</a> does.
1174 Q: Could mono become a hybrid CIL/java platform?
1176 A: This can be obtained easily with IKVM.
1178 Q: Do you plan to implement a Javascript compiler?
1180 A: Yes. The beginnings of the JScript compiler can be found on CVS.
1181 Cesar coordinates this effort.
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?
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.
1194 <a name="extending"></a>
1197 Q: Would you allow other classes other than those in the
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
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
1210 For more information on extending Mono, see our <a
1211 href="ideas.html">ideas</a> page.
1213 Q: Do you plan to Embrace and Extend .NET?
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.
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
1223 Today Mono ships with a number of extra libraries that were
1224 developed either by members of the Mono community, or other
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
1232 Q: Is there any way I can develop the class libraries using Linux yet?
1234 A: Yes. Mono has been selfhosting since March 2002.
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
1241 A: Yes. Just use two installation prefixes.
1244 <a name="portability"></a>
1247 Q: Will Mono only work on Linux?
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.
1253 Q: What about Mono on non Linux-based systems?
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.
1261 Q: What operating systems/CPUs do you support
1263 A: Mono currently runs on Linux, Windows, Solaris, FreeBSD, HP-UX and
1266 There is a JIT engine available for x86 processors that can
1267 generate code and optimizations tailored for a particular CPU.
1269 Interpreters exist for the SPARC v8, SPARC v9, Itanium, HP-PA,
1270 PowerPC and StrongARM CPUs.
1272 Q: Does Mono run on Windows?
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>
1277 Q: Does Mono run on Linux?
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>
1282 Q: Will I require Cygwin to run mono?
1284 A: No. Cygwin is only required to build Mono.
1286 Q: Will Mono depend on GNOME?
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.
1293 Q: Do you plan to port Rhino to C#?.
1295 A: Eto Demerzal has started a Rhino port to C#.
1297 Q: Has anyone succeeded in building a Mac version of the C# environment.
1298 If so can you explain how?
1300 A: Yes, Mono works on Linux/PPC and MacOS X (10.2 and 10.3)
1302 <a name="reuse"></a>
1303 ** Reusing Existing Code
1305 Q: What projects will you reuse or build upon?
1307 A: We want to get Mono in the hands of programmers soon. We are
1308 interested in reusing existing open source software.
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?
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.
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?
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.
1326 Q: Will built-in reporting be supported for crystal reports? This is a
1327 heavily used part of our system.
1329 A: . Crystal Reports are propriety. Someone may try to emulate
1330 the behavior, but no-one has yet volunteered.
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?
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.
1342 Q: System.Data.SqlClient with FreeTDS, will you port parts of these to C# and
1345 A: This has been done.
1350 Q: Are you working on a GCC front-end to C#?
1352 A: We are not working on a GCC front-end for C#
1354 Q: Will you support C/C++ on the Mono VM?
1356 A:The open64 compiler effort from SGI helps a lot in this direction.
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.
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.
1367 So it will be possible to use the GCC compilers to target the CIL.
1369 Q: What about Managed C++?
1371 A: Once a full translator for WHIRL exists, we are interested in
1372 looking at expanding the GCC frontends to include extensions for
1375 Q: What about making a front-end to GCC that takes CIL images and
1376 generates native code?
1378 A: There is no active work on this area, but Mono already provides
1379 pre-compilation services (Ahead-of-Time compilation).
1382 <a name="performance"></a>
1385 Q: How fast will Mono be?
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'.
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.
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.
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.
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.
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.
1415 <a name="licensing"></a>
1418 Q: Will I be able to write proprietary applications that run with
1421 A: Yes. The licensing scheme is planned to allow proprietary
1422 developers to write applications with Mono.
1424 Q: What license or licenses are you using for the Mono Project?
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>
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
1439 For licensing details, contact <a
1440 href="mailto:mono-licensing@ximian.com">mono-licensing@ximian.com</a>
1443 Q: I would like to contribute code to Mono under a particular
1444 license. What licenses will you accept?
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.
1450 <a name="patents"></a>
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)?
1457 A: First some background information.
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.
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.
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
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>.
1484 Basically a grant is given to anyone who want to implement those
1485 components for free and for any purpose.
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.
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.
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.
1505 The patents do not apply in countries where software patents are
1508 For Linux server and desktop development, we only need the ECMA
1509 components, and things that we have developed (like Gtk#) or Apache
1512 Q: Is Mono only an implementation of the .NET Framework?
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.
1519 The following map shows the relationship between the components:
1521 <img src="http://primates.ximian.com/~miguel/tmp/map.png">
1523 <a name="obfuscation"></a>
1526 Q: Are there any obfuscation programs for Mono/Linux?
1528 A: We are not aware of these, but some from Windows might work.
1530 Q: What could I do to avoid people decompiling my program?
1532 A: You can use the bundle functionality in Mono.
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.
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.
1544 It is not impossible to break, just like any other obfuscators.
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.
1550 Q: Any other option?
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.
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.
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).
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).
1569 ** Miscellaneous Questions
1571 Q: You say that the CLI allows multiple languages to execute on the
1572 same environment. Isn't this the purpose of CORBA?
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.
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
1587 Q: Will you support COM?
1589 A: The runtime will support XPCOM on Unix systems and COM on Windows.
1590 Most of the code for dynamic trampolines exists already.
1592 Q: Will Ximian offer certifications on Mono or related technologies?.
1594 A: It's possible. But there is no plan about this. So the short answer is no.
1596 Q: How can I report a bug?
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.
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>.
1608 Q: Does mcs support the same command line options as the MS C#
1611 A: The Mono C# compiler now supports the same command line
1612 arguments as the Microsoft C# compiler does.
1614 Q: How about getting searchable archives on lists.ximian.com?
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>.
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?
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
1630 Q: Why are you going for a GtkHtml implementation?
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).
1642 Q: Is there a command-line tool that allows me to access .NET interactively?
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.
1647 Q: Is it possible to use Visual C++ with Mono?.
1649 A: It's possible to run VC++ generated apps under Mono, but we do not
1650 provide a Manager C++ compiler ourselves.
1652 Q: Does Mono support generics?.
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'.
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.
1661 <a name="problems"></a>
1662 ** Mono Common Problems
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.
1670 The FAQ contains material contributed by Miguel de Icaza, Jaime Anguiano, Lluis Sánchez.