+ As of today, Mono is not 100% finished, so it is sometimes useful
+ to compile the code with Mono, to find out if your application
+ depends on unimplemented functionality.
+
+Q: Will applications run out the box with Mono?
+
+A: Sometimes they will. But sometimes a .NET application might invoke
+ Win32 API calls, or assume certain patterns that are not correct
+ for cross-platform applications.
+
+Q: What is a 100% .NET application?
+
+A: A `100% .NET application' is one that only uses the APIs defined
+ under the System namespace and does not use P/Invoke. These
+ applications would in theory run unmodified on Windows, Linux,
+ HP-UX, Solaris, MacOS X and others.
+
+ Note that this requirement also holds for all assemblies used by the
+ application. If one of them is Windows-specific, then the entire program
+ is not a 100% .NET application.
+
+ Furthermore, a 100% .NET application must not contain non-standard data
+ streams in the assembly. For example, Visual Studio .NET will insert a
+ <tt>#-</tt> stream into assemblies built under the "Debug" target.
+ This stream contains debugging information for use by Visual Studio .NET;
+ however, this stream can not be interpreted by Mono (unless you're willing
+ to donate support).
+
+ Thus, it is recommended that all Visual Studio .NET-compiled code be
+ compiled under the Release target before it is executed under Mono.
+
+Q: Can I execute my Visual Studio .NET program (Visual Basic .NET, Visual C#,
+ Managed Extensions for C++, etc.) under Mono?
+
+A: Yes, with some reservations.
+
+ The .NET program must either be a 100% .NET application, or (somehow) have
+ all dependent assemblies available on all desired platforms. (How to do so
+ is outside the bounds of this FAQ.)
+
+ Mono must also have an implementation for the .NET assemblies used. For
+ example the System.EnterpriseServices namespace is part of .NET, but it
+ has not been implemented in Mono. Thus, any applications using this
+ namespace will not run under Mono.
+
+ With regards to languages, C# applications tend to be most portable.
+
+ Visual Basic .NET applications are portable, but Mono's
+ Microsoft.VisualBasic.dll implementation is incomplete. It is recommended
+ to either avoid using this assembly in your own code, only use the
+ portions that Mono has implemented, or to help implement the missing
+ features. Additionally, you can set 'Option Strict On', which
+ eliminates the implicit calls to the unimplemented
+ Microsoft.VisualBasic.CompilerServices.ObjectType class.
+ (Thanks to Jörg Rosenkranz.)
+
+ Managed Extensions for C++ is least likely to operate under Mono. Mono
+ does not support mixed mode assemblies (that is, assemblies containing both
+ managed and unmanaged code, which Managed C++ can produce). You need a
+ fully-managed assembly to run under Mono, and getting the Visual C++ .NET
+ compiler to generate such an executable can be difficult. You need to use
+ only the .NET-framework assemblies, not the C libraries (you can't use
+ <b>printf</b>(3) for example.), and you need to use
+ the linker options <tt>/nodefaultlib /entry:main mscoree.lib</tt> in
+ addition to the <tt>/clr</tt> compiler flag. You can still use certain
+ compiler intrinsic functions (such as <b>memcpy</b>(3)) and the STL.
+ You should also see <a
+ href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vcmex/html/vcgrfconvertingmanagedextensionsforcprojectsfrommixed-modetopureil.asp"
+ >Converting Managed Extensions for C++ Projects from Mixed Mode to Pure
+ Intermediate Language</a> at MSDN.
+ Finally, you can use PEVERIFY.EXE from the .NET SDK to determine if the
+ assembly is fully managed.
+
+ Thanks to Serge Chaban for the linker flags to use.
+
+<a name="pnpproject"></a>
+** Mono and Portable.NET
+
+Q: What are the differences between Mono and Portable.NET?
+
+A: Most of Mono is being written using C#, with only
+ a few parts written in C (The JIT engine, the runtime, the
+ interfaces to the garbage collection system).
+
+ It is easier to describe what is unique about Mono:
+ <ul>
+ <li> An advanced native-code compilation engine: Both
+ just-in-time compilation (JIT) and pre-compilation of CIL
+ bytecodes into native code are supported.
+
+ <li> A foundation for code optimization: The new code generator in
+ Mono builds on the experience of our first JIT engine, and enables
+ us to implement various advanced compiler optimization
+ tricks. With an SSA-framework, plenty of new optimizations are possible.
+
+ The current list of optimizations are: Peephole postpass,
+ Branch optimizations, Inline method calls, Constant folding, Constant
+ propagation, Copy propagation, Dead code elimination, Linear scan
+ global reg allocation, Conditional moves, Emit per-domain code,
+ Instruction scheduling, Intrinsic method implementations, Tail
+ recursion and tail calls, Loop related optimizations, Fast x86 FP
+ compares, Leaf procedures optimizations
+
+ <li> A self-hosting C# compiler written in C#, which is clean, easy
+ to maintain.
+
+ <li> Focus on the .NET Framework: we are tracking down the .NET
+ Framework API definition, as we believe it is the API people
+ will be most familiar with.
+
+ <li> A multi-platform runtime engine: both a JIT engine and an
+ interpreter exist. The JIT engine runs currently on x86,
+ PowerPC Sparc and S390 systems, while the interpreter works on
+ x86, SPARC, StrongARM, s390 and PowerPC systems.
+
+ The JIT engine is being ported to amd64 systems as of this
+ time.
+
+ <li> Supports Linux, BSD, MacOS, Windows and Solaris at this point.
+
+ <li> The JIT engine is written using a portable instruction
+ selector which not only generates good code but
+ is also the foundation to re-target the JIT engine to other
+ systems.
+
+ <li> Full support for remoting in the runtime.
+
+ <li> The C# compiler, the JIT engine and the class libraries are
+ mature enough that the whole system has been self-hosting
+ since April 2002. This means that we develop Mono
+ completely with itself at this point.
+
+ By forcing ourselves to use our own code to develop our
+ tools, we bug fix problems rapidly, and the system is
+ overall more robust and tested than if we did not.
+
+ <li> Our class libraries are licensed under the terms of the MIT
+ X11 license which is a very liberal license as opposed to
+ the GNU GPL with exceptions, this means that Mono can be
+ used in places where the GPL with exceptions is not
+ permissible.
+
+ <li> Mono has a complete Web Services stack: we implement ASP.NET
+ web servers and web clients as well as implementing the
+ Remoting-based SOAP infrastructure.
+
+ <li> Remoting implementation: Mono has a complete remoting
+ infrastructure that is used in our own codebase to provide
+ added functionality and performance to our ASP.NET engine
+ and more.
+
+ <li> Mono has a complete <a href="c-sharp.html">C# 1.0</a>
+ implementation and has been stress tested a lot more than
+ Portable.NET's compiler.
+
+ <li> Mono's C# compiler has strong error handling and has closer
+ adherence to the specification with support for definite
+ assignment (required to generate verifiable IL code) and
+ CLS conformance checking.
+
+ <li> Mono's C# compiler is written in C# which is easier for new
+ developers to come in and improve, fix and tune. The Mono
+ C# compiler in C# is faster than their C-based compiler.
+
+ <li> Preview of C# 2.0: a work in progress for a 2.0
+ implementation of our compiler is available (iterators,
+ generics and anonymous methods are available in our
+ "preview" compiler).
+
+ <li> Mono has a complete Reflection and Reflection.Emit: these
+ are important for advanced applications, compilers and
+ dynamic code generation.
+
+ <li> Mono has a <a href="xml-classes.html">complete managed XML
+ stack</a>: XML, XPath, XML Serializer, XML Schema handling
+ are fully functional, feature complete and tuned for
+ performance.
+
+ <li> Mono has a <a href="crypto.html">complete cryptography stack
+ </a>: we implement the 1.0 and 1.1 APIs as well as using our
+ fully managed stack to implement the SSL/TLS transports.
+
+ <li> <a href="ado-net.html">Extensive database support</a>: Mono
+ ships with database provides for <a
+ href="firebird.html">Firebird</a>, <a href="ibmdb2.html">IBM
+ DB2</a>, <a href="oracle.html">Oracle</a>, <a
+ href="sybase.html">Sybase</a>, Microsoft <a
+ href="tdsclient.html">SQL Server</a>, <a
+ href="sqlite.html">SQL Lite</a>, <a
+ href="mysql.html">MySQL</a>, <a
+ href="postgresql.html">PostgresSQL</A>, <a href="oledb.html">Ole
+ DB</a> and <a href="odbc.html">ODBC</a>.
+
+ <li> Mono includes full LDAP support.
+
+ <li> We have a great community of developers, without which Mono
+ would not be possible.
+ </ul>
+
+ In general, Mono is more mature and complete since it has been used
+ to develop itself, which is a big motivator for stability and
+ correctness, while Portable.NET remains pretty much an untested
+ platform.
+
+Q: I hear Mono keeps changing the P/Invoke API, why?
+
+A: We are just fixing our implementation to be compatible with the
+ Microsoft implementation. In other words, the Mono P/Invoke API is
+ more complete when compared to the Portable.NET version, hence
+ various pieces of software that depend on this extended
+ functionality fail to work properly with Portable.NET.
+
+<a name="webservices"></a>