Mono Migration Analyser tool (MoMA): Port Windows Software To Linux
The Mono Migration Analyser tool: is it really necessary? eWEEK Labs puts MoMA through its paces.
But that’s not the end of the story. The run-time that ships with Mono can process binaries that were compiled under .NET. If the tool detects no problems, then you don’t need to recompile it under Mono (although you can if you want to). Instead, you can launch the Mono run-time, passing the .NET program’s name as a command-line parameter, and your .NET program will run (hopefully) as is under Mono – even on Linux.
Don’t believe me? Try it. Create a simple Form application in Visual Studio and compile it. Then boot to Linux. From the Linux command prompt, type mono, and pass the full path and file name to the form1.exe file, or whatever you called it. I kid you not – it will run under Linux, provided you installed all the Mono libraries, including the Forms library. Note, however, that by default you might not have the Forms library. If not, Google the error message you see and you’ll find instructions on how to install it. Then watch your program run under Linux.
eWEEK Labs Takes MoMA for a Spin
Here’s a rundown of what happens in MoMA. The program gets installed in its own directory, as it includes several DLLs and is itself a .NET binary.
Since MoMA is a .NET binary, I figured I could use it to analyse itself. Indeed, I was able to run MoMA under MoMA (out of sheer curiosity), and expected that it would come up clean.
The program runs as a wizard with several steps.
Step 1 shows an introductory screen explaining how MoMA works.
In Step 2, you choose your binaries and specify the version of Mono you’re testing against. The screen includes a listbox that you fill with the binaries you want to test (you can test multiple binaries.) This step lets you choose individual files or an entire directory. For entire directories, you click through a tree until you get to the directory containing the binaries you want to test. Then you select the directory. The tool’s listbox will fill up with all the DLL and .exe files it finds in that directory, you then have to manually remove the ones you don’t want to test.
If you have a lot of binaries, this works great; otherwise, just click the button with a plus sign and add individual binaries. (I also discovered a little trick: The File-Open box where you can select individual files lets you select multiple files. So there are many ways to choose your binaries.)
For this particular test, I filled the listbox with the three DLLs and single executable file found in its directory. Then I clicked Next to move to the next screen in the wizard.
Step 3 in the wizard starts the scanning. The first thing the tool does is make sure the binaries are all indeed CLI binaries. If you choose, for example, a plain old Win32 DLL or .exe, the tool will alert you that it’s skipping that file.