473,378 Members | 1,447 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

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 2151
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********@onyxREMfund.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.com>
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********@onyxREMfund.com> wrote in message
news:%2****************@TK2MSFTNGP11.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
by: jenniferyiu | last post by:
IMHO, simply NO. False actually, practically.
32
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...
27
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
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...
10
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;...
2
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 ...
1
by: newstips6706 | last post by:
The Operating System of Organic Machines Building your own "KERNEL". --------------------------------------------------------------------------------
1
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...
0
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...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.