Migrating Established Code From .Net to Mono

| by Jeff Martin Follow 11 Followers on Nov 10, 2011. Estimated reading time: 1 minute |

A note to our readers: You asked so we have developed a set of features that allow you to reduce the noise: you can get email and web notifications for topics you are interested in. Learn more about our new features.

A legacy application code base represents a significant investment of time and money for a developer. Ideally the existing code can easily be combined with some platform specific glue that will produce a quick turnaround that leverages the original investment. In practice such re-targeting may not be always that easy, so the recent article, “Real world feedback on a .Net to Mono migration” by Patrick Smacchia is a useful report on his experience migrating existing .Net code to the Mono platform.

Smacchia describes his company's recent efforts to migrate his original product NDepend – written for the .Net platform– to produce a new product, JavaDepend, which is designed to run on Mono under both Windows and Linux. Overall he considers the effort very successful and the use of the Mono platform contributed to an estimated reuse of 90% of the existing code base.

Notably, a few features were instrumental in the ease of the platform migration. Mono's Migration Analyzer (MoMA) was used to locate both platform specific code and code using .Net features not yet supported by Mono. As described on its homepage, the Migration Analyzer may generate some false positives, and will not catch all potential issues. However Smacchia was pleased with the MoMA's performance. The biggest problem area MoMA identified was in relation to a third party GUI library used by NDepend. Rather than be forced to maintain separate GUI tracks for the Windows and Linux versions, the developers chose to utilize wrapper classes which could map the proprietary GUI code to standard .Net components.

Smacchia had high praise for Mono's GDI+ support, emphatically stating “[that] the Mono implementation of GDI+ did the job! Bravo! I really have to [congratulate] the Mono team...” Finally there were a couple of Windows Form components (DataGridView/ListView and RichTextBox) that produced erratic behavior under Mono. The open source nature of the Mono project allowed the developers to make the specific changes they needed without relying on a official Mono release to correct the problems.

Rate this Article

Adoption Stage

Hello stranger!

You need to Register an InfoQ account or or login to post comments. But there's so much more behind being registered.

Get the most out of the InfoQ experience.

Tell us what you think

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread
Community comments

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread


Login to InfoQ to interact with what matters most to you.

Recover your password...


Follow your favorite topics and editors

Quick overview of most important highlights in the industry and on the site.


More signal, less noise

Build your own feed by choosing topics you want to read about and editors you want to hear from.


Stay up-to-date

Set up your notifications and don't miss out on content that matters to you