Cross-platform compatibility of VB.NET apps

esposito

Centurion
Joined
Jul 11, 2003
Messages
103
Location
Perugia - Italy
Hello, everybody. I have just started to study VB.NET and, reading some articles, I have learnt that this development tool allows you to create applications which can (or will soon be able to) run under any operating systems.

I have also learnt that it is already possible to make your VB.NET apps run under Linux thanks to the so-called Mono Poject which has provided this OS with its own version of the .NET framework.

My question is, what kind of VB.NET apps can actually run under Linux? Only the Web applications created in ASP.NET or even the byte-code executables based on Windows forms?

Please consider I have never used Linux in my life and I don't even know whether the executables made for that OS are characterized by an EXE extension. In spite of this, the idea of being able to create applications for more than one operating system really attracts me.

Thanks in advance for your help.
 
esposito said:
Hello, everybody. I have just started to study VB.NET and, reading some articles, I have learnt that this development tool allows you to create applications which can (or will soon be able to) run under any operating systems.

I have also learnt that it is already possible to make your VB.NET apps run under Linux thanks to the so-called Mono Poject which has provided this OS with its own version of the .NET framework.

My question is, what kind of VB.NET apps can actually run under Linux? Only the Web applications created in ASP.NET or even the byte-code executables based on Windows forms?

Please consider I have never used Linux in my life and I don't even know whether the executables made for that OS are characterized by an EXE extension. In spite of this, the idea of being able to create applications for more than one operating system really attracts me.

Thanks in advance for your help.

I've played with Mono compiler some. There is a Windows .exe. too. Try using that before venturing into the *dynamic" world of 'Nix..... My suggestion :)
You can run the application in "Nix using it's compiler (meaning compile first, then start the process with the "mock" framework that is ported over. Good luck.
 
Is it necessary to use the MONO compiler to make your VB.NET exe run under Linux? Isn't it possible to have people download the same executable from your Web site and see it work under both Windows and Linux?
 
esposito said:
Is it necessary to use the MONO compiler to make your VB.NET exe run under Linux? Isn't it possible to have people download the same executable from your Web site and see it work under both Windows and Linux?

Once compiled with MONO, it should work (presuming it's debugged well)...And yes and no, you can download windows .exe for Windows OS and you will need to recompile in 'nix to get it to work with MONO.
 
Sorry if I'm asking questions that could sound ingenuous to you, but I've never used Linux in my life.

Does it mean that a Linux user can download a Windows EXE and recompile it in a Linux compatible format? This mkes me understand that you don't need the source files to create an executable under Linux.

How is it possible?

Nightyhawk said:
Once compiled with MONO, it should work (presuming it's debugged well)...And yes and no, you can download windows .exe for Windows OS and you will need to recompile in 'nix to get it to work with MONO.
 
esposito said:
Sorry if I'm asking questions that could sound ingenuous to you, but I've never used Linux in my life.

Does it mean that a Linux user can download a Windows EXE and recompile it in a Linux compatible format? This mkes me understand that you don't need the source files to create an executable under Linux.

How is it possible?

No problem. Sorry, if I sound arrogant or rude. The misunderstanding is this: yes, you will need the source to recompile (and make changes, like debugging) but if you only want to run the app., then you will just need the .exe.
 
I'm afraid I'm missing something. It may be because English is not my native language.

You said you just need the exe to make the application run, but if your exe was created under Windows, will it work under Linux without recompiling it? That's all I need to know.

Thanks again.

By the way, you are neither arrogant nor rude: you are just trying to explain something to an Italian who has never used Linux in his life.

Nightyhawk said:
No problem. Sorry, if I sound arrogant or rude. The misunderstanding is this: yes, you will need the source to recompile (and make changes, like debugging) but if you only want to run the app., then you will just need the .exe.
 
esposito said:
I'm afraid I'm missing something. It may be because English is not my native language.

You said you just need the exe to make the application run, but if your exe was created under Windows, will it work under Linux without recompiling it? That's all I need to know.

Thanks again.

By the way, you are neither arrogant nor rude: you are just trying to explain something to an Italian who has never used Linux in his life.

Windows .exe will not run in 'Nix. Nor will they probably ever. They are compiled with make files and then ran. Any more questions?
 
From playing around with mono a few months ago myself it depends on the area's of functionality. windows forms were poorly supported then - not sure how well they are supported now. Console apps seemed to work fine and quite large parts of ASP.Net were working without any problems.
At the end of the day .Net code compiles to an intermediate language called MSIL (literaly Microsoft Intermediate Language) which is a subset of the Common Intermediate Language and similar to Java byte code runs in a virtual machine style environment.
There is absolutley no reason why a .Net .exe or .dll cannot be used on any platform that supports a compatible version of the runtime - it's just that there are currently no 100% compatible implementations out there.
 
I read the Mono FAQ page you suggested and the conclusion I have come to is that they are working hard in order to achieve perfect compatibility with Windows forms.

Of course, the basic requirement that a VB.NET executable must have in order to be cross platform is that the programmer must make no call to the Windows API. According to what the Mono experts say, any other incompatibility problem will be overcome, slowly but surely.

This is something that really excites me. I have never used Linux is my life and yet I'll be able to produce software for that OS! Isn't the .NET platform great?

PlausiblyDamp said:
From playing around with mono a few months ago myself it depends on the area's of functionality. windows forms were poorly supported then - not sure how well they are supported now. Console apps seemed to work fine and quite large parts of ASP.Net were working without any problems.
At the end of the day .Net code compiles to an intermediate language called MSIL (literaly Microsoft Intermediate Language) which is a subset of the Common Intermediate Language and similar to Java byte code runs in a virtual machine style environment.
There is absolutley no reason why a .Net .exe or .dll cannot be used on any platform that supports a compatible version of the runtime - it's just that there are currently no 100% compatible implementations out there.
 
esposito said:
I read the Mono FAQ page you suggested and the conclusion I have come to is that they are working hard in order to achieve perfect compatibility with Windows forms.

Of course, the basic requirement that a VB.NET executable must have in order to be cross platform is that the programmer must make no call to the Windows API. According to what the Mono experts say, any other incompatibility problem will be overcome, slowly but surely.

This is something that really excites me. I have never used Linux is my life and yet I'll be able to produce software for that OS! Isn't the .NET platform great?

Yes, that is great. Although, bugs are stil being worked out as to be expected with most things and Microsoft.
 
I would like to take advantage of your experience to ask you a question about the compatibility with Mono of VB.NET executables containing one or more calls to VisualBasic.dll.

On Mono's FAQ page, I read that the compatibility with that library is only partial.

I make large use of Random type databases which refer to VisualBasic.dll and, for that reason, I would very much like to know, from those of you who have installed and tested Mono, if a table created in VB.NET like the one below could create compatibility problems:

Visual Basic:
Imports System
Imports System.IO
Imports Microsoft.VisualBasic

Public Class frmDatabase
    Inherits System.Windows.Forms.Form

    Structure PERSONE
        <VBFixedString(20)> Dim varFirstname As String
        <VBFixedString(20)> Dim varSurname As String
        <VBFixedString(20)> Dim varTelephone As String
    End Structure

Thanks in advance.
 
esposito said:
I would like to take advantage of your experience to ask you a question about the compatibility with Mono of VB.NET executables containing one or more calls to VisualBasic.dll.

On Mono's FAQ page, I read that the compatibility with that library is only partial.

I make large use of Random type databases which refer to VisualBasic.dll and, for that reason, I would very much like to know, from those of you who have installed and tested Mono, if a table created in VB.NET like the one below could create compatibility problems:

Visual Basic:
Imports System
Imports System.IO
Imports Microsoft.VisualBasic

Public Class frmDatabase
    Inherits System.Windows.Forms.Form

    Structure PERSONE
        <VBFixedString(20)> Dim varFirstname As String
        <VBFixedString(20)> Dim varSurname As String
        <VBFixedString(20)> Dim varTelephone As String
    End Structure

Thanks in advance.

Variable strings aren't generally recommended, so I am not sure if it would work.
 
I've just learnt the Mono Project comes with a Visual Basic compiler too, so the chances my code works with the framework for Linux aren't probably too slim.

I wonder if Microsoft made a mistake releasing the .NET framework: many companies are working on free versions of the IDE and, in theory, any other OS could be compatible with the apps created with VS .NET.

I think this could be a danger for the monopoly of Windows in the long run and, believe it or not, I don't like this idea. I produce software which is mostly dependent on the Win32 API. If people start using other operating systems, the number of my potential clients could decrease.

I know this may sound selfish but, after all, that's what business is all about.
 
But if you start to code against the .Net framework rather than a specific vendor API (win32 for example) in the long term you could be reaching more clients than if you were just win32.
ASP.Net development without requiring IIS as a server could be a tempting idea for the Unix users out there.
 
If you based your apps on the .NET API only, there are a lot of things you would never be able to do, such as the management of multimedia files.

I think Windows is great because it represents a standard for the majority of computer users. Switching to different OS's could threaten this standardization and all the advantages it brings with it.

PlausiblyDamp said:
But if you start to code against the .Net framework rather than a specific vendor API (win32 for example) in the long term you could be reaching more clients than if you were just win32.
ASP.Net development without requiring IIS as a server could be a tempting idea for the Unix users out there.
 
Next releases of the .NET Framework will bring more and more classes. Including the ability to play sounds, videos (that is at least what I read somewhere, but don't remeber where :) ). As Win32API is being slowly phased out, the Framework will provide more and more features to substitute for the loss.
 
Back
Top