faq 65 KB

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