473,761 Members | 10,684 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Operating System Independent Code

Hi

Can i write programs in .net - vb.net/c sharp which are
operating system independent.
I can run the same code in any OS i want just as we can do
it in Java.
That is what MSIL is all about if i m not wrong.

regards
R.

Jul 19 '05 #1
3 2189
A
> Can i write programs in .net - vb.net/c sharp which are
operating system independent. I can run the same code in any OS i want just as we can do it in Java. That is what MSIL is all about if i m not wrong.


Short answer: Yes.

Long answer: Yes, provided that there is a compiler in that OS. Mono works
in Linux. I don't know if OS X has one, but in theory Mono should work there
as well. I do know that the WinForms components of Mono is still in the
works, and that it uses wine to emulate windows looking forms (I don't know
the reason behind that).

MS does not provide compilers for anything except Windows (surprize?) but
there are teams out there that are developing for other platforms. There are
vairous other organizations that have other things available for .Net
(ActiveState).

-Akshay
Jul 19 '05 #2
A <aa********@ony xREMfund.com> wrote:
Short answer: Yes.

Long answer: Yes, provided that there is a compiler in that OS. Mono works
in Linux. I don't know if OS X has one, but in theory Mono should work there
as well. I do know that the WinForms components of Mono is still in the
works, and that it uses wine to emulate windows looking forms (I don't know
the reason behind that).

MS does not provide compilers for anything except Windows (surprize?) but
there are teams out there that are developing for other platforms. There are
vairous other organizations that have other things available for .Net
(ActiveState).


Slight clarification here: it's not the C#->IL compiler which is needed
for that OS - the code can be compiled to an assembly in Windows and
then run on Mono in Linux. It's the CLR (usually including a JIT
compiler) which needs to be present on the target machine - the
equivalent of a JRE in the Java world.

--
Jon Skeet - <sk***@pobox.co m>
http://www.pobox.com/~skeet/
If replying to the group, please do not mail me too
Jul 19 '05 #3
A few other clarifications:

There is not presently any "official" way to run .Net applications on
non-Windows operating systems. The open-source Mono project (to run apps on
Linux/Unix/Mac systems) is still in development. If and when it works,
however, it should be very cool. It seems to have Microsoft's tacit
blessing. (Microsoft probably wants Mono to succeed, to give additional
legitimacy to the .Net platform and wean the world away from Java.) Check
out:

http://www.go-mono.com/

Also, Microsoft has released a code library called Rotor under its "shared
source" license. (I.e., noncommercial use.) This ports the CLR to
Unix-based machines (including Macs and Linux, I think), so it will
theoretically allow .Net applications to be run on these other OSes.
However, the documentation for Rotor emphasizes that it's for demonstration
purposes only, and has a "beta" quality to it. It shows that Microsoft
_could_ release the CLR to run on other platforms rather easily, if it
wanted to. (Crossing fingers.)

Hope this helps,

Robert Jacobson
"A" <aa********@ony xREMfund.com> wrote in message
news:%2******** ********@TK2MSF TNGP11.phx.gbl. ..
Can i write programs in .net - vb.net/c sharp which are
operating system independent.

I can run the same code in any OS i want just as we can do

it in Java.

That is what MSIL is all about if i m not wrong.


Short answer: Yes.

Long answer: Yes, provided that there is a compiler in that OS. Mono works
in Linux. I don't know if OS X has one, but in theory Mono should work

there as well. I do know that the WinForms components of Mono is still in the
works, and that it uses wine to emulate windows looking forms (I don't know the reason behind that).

MS does not provide compilers for anything except Windows (surprize?) but
there are teams out there that are developing for other platforms. There are vairous other organizations that have other things available for .Net
(ActiveState).

-Akshay

Jul 19 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
1817
by: jenniferyiu | last post by:
IMHO, simply NO. False actually, practically.
32
9797
by: David Brown | last post by:
Hello. I recently came across a free operating system called Unununium (or something like that) and it was developed in Python and Assembly. Now, I have been looking for a way to make an operating system for a long long time and the only possibilities I could find were C++ and assembly. I don't mind assembly so much if I don't have to use it very often. But C++ is so complicated and errors are pretty much impossible to find in the code...
27
6796
by: Kevin A | last post by:
Hi, Is there a way to determine the name and version of the operating system in a portable way? (for Solaris/Linux) Thanks, Kevin
3
335
by: Rajiv Thakur | last post by:
Hi Can i write programs in .net - vb.net/c sharp which are operating system independent. I can run the same code in any OS i want just as we can do it in Java. That is what MSIL is all about if i m not wrong. regards R.
10
3252
by: Vavel | last post by:
Hi all! I want to insert the record into the table by using an application program that includes the following statements: EXEC SQL BEGIN DECLARE SECTION; long hvInt_Stor; long hvExt_Stor; EXEC SQL END DECLARE SECTION; hvInt_Stor = MMDB_STORAGE_TYPE_INTERNAL; hvExt_Stor = MMDB_STORAGE_TYPE_EXTERNAL;
2
1602
by: seash | last post by:
H iam developing my windows form application(ide:visual studio.net 2003, visual c#) on windows 2000 professional operating system , but when i run the exe on Xp operating system, the screen (windows form) of my application gets truncated at the end of the screen i have to make changes to the forms height and width to make it fully visible on the screen iam using infragistics library for some controls on the form, is it the culprit i...
1
1934
by: newstips6706 | last post by:
The Operating System of Organic Machines Building your own "KERNEL". --------------------------------------------------------------------------------
1
10251
by: jdresow | last post by:
I installed MySQL on a windows server 2003, in an acxtive directory domain and I get error 32 which is a sharing error. I do not understand this and I am also adding the first several lines of my .err log: InnoDB: The first specified data file D:\MySQL Datafiles\ibdata1 did not exist: InnoDB: a new database to be created! 070202 16:23:54 InnoDB: Setting file D:\MySQL Datafiles\ibdata1 size to 10 MB InnoDB: Database physically writes the...
0
3780
by: nancylife | last post by:
When developing web report, many developers use VMware to simulate different operating systems on a same server. Then, they can realize cross-platform deployment and debug of web report. According to real application of web report, I will discuss three network setting ways of VMware with all of you. Bridge way This is the simplest way as it bridges the virtual network card to a physical network card directly. It is similar to a network...
0
10107
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
9900
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9765
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7324
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6599
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5214
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5361
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
3442
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2733
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.