Novell Home

Novell Connection Magazine Home

From .NET to Linux in Five Easy Steps

  • Audio

Step 4: Run and Debug the Application on a Remote Linux Machine

Here, you take advantage of the debugger integration offered with Mono Tools for Visual Studio, enabling you to debug the application on the target platform of Mono on Linux. This step may uncover issues that do not arise when running the application locally on Mono on Windows, but will show up when running the application on Mono on Linux. (For example, the application may include embedded explicit file and path names. Unlike Windows, the Linux file system is case-sensitive with respect to file and path names.)

If database migration is required, you may need to alter connection strings and URLs. However, this is usually unnecessary because Mono supports connecting to Microsoft SQL Server and most other databases over the network.

To run and debug your application on the target Linux machine, select Debug Remotely in Mono on the Mono drop-down menu.

The Choose Remote Host dialog will appear. (See Figure 2.)

Choose the target host and click OK. Mono Tools will deploy the application to the target server. Web applications will be launched in your default browser. Desktop applications will open on the target machine's desktop. A balloon will appear over the MonoVS tray application in your workstation indicating that a remote instance of the application is running. (See Figure 3.)

If a crash occurs on the remote machine, the debugger will suspend execution and allow you to examine and correct the exception within Visual Studio.

When you are able to run the application error free on the remote Linux machine, you are then ready to deploy it to the target machines.

Step 5: Deploy the Application

Here, you have a few options. You can deploy Web applications by merely copying the project files to the target machines. In the case of a Web site, you might choose to first compile the application using the Visual Studio Publish option of the Build command, and then copy the compiled files to the target server.

You may choose to create an installable RPM Package (the Linux equivalent of a Windows MSI build file) for distribution. To create an RPM package, first open the application project in Visual Studio. Click Build on the Visual Studio Menu Bar. Select Create Linux Package for Project on the Mono drop-down menu.

This launches a wizard that guides you through a series of steps in which you configure the application package. Mono Tools builds the RPM and saves the file to the location that you specified, optionally leaving a copy on the server used to build it.

Another option is to create an appliance. Here, you have your choice of creating a software appliance, a virtual appliance or a hardware appliance. Appliances permit you to deploy self-booting, ready-to-run solutions (such as customer demos) to customers and cloud providers running hypervisors, and ready-to-run applications on plug-and-play hardware (such as DVDs and USB sticks).

Subscribe to Connection Magazine

To create a SUSE Linux appliance, first create an RPM package, and then select Create SUSE Powered Appliance on the Mono drop-down menu. This invokes the SUSE Studio Appliance Wizard—a Novell sponsored online service. (See Figure 4.)

The wizard will take you though the necessary steps to build the appliance. Once you've built your appliance, you can visit the SUSE Studio Web site at to test the appliance and download the finished product.

Enjoy the Freedom

The combination of Mono and Mono Tools for Visual Studio eliminates the pain and cost previously associated with moving from .NET to Linux. It simplifies the task of migrating .NET applications to Linux, and allows your .NET developers to remain in their Visual Studio comfort zone.

With Mono and Mono Tools for Visual Studio, you can take advantage of the cost savings, increased deployment options and addressable market enabled by Linux, while leveraging the investment you've made in .NET. Your .NET developers will thank you and so will your CFO.

For More Information

Take advantage of an interactive tutorial provided by Novell. You'll find it at


  • Figure 1

    Mono Tools adds a Mono command and drop-down menu to the Visual Studio menu bar.

  • Figure 2

    To select the remote Linux host on which you wish to run and debug your .NET application, click on that host in the MonoVS, choose Remote Host dialog and then click OK.

  • Figure 3

    When you are running a .NET application on a remote Linux host, a balloon will appear over the MonoVS application icon in your workstation system tray, indicating that a remote instance of the application is running.

  • Figure 4

    You can invoke the SUSE Studio Appliance Wizard-a Novell sponsored online service-to create a software, virtual or hardware appliance. The wizard will take you though the necessary steps to build the appliance.

© 2015 Micro Focus