473,769 Members | 2,331 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 2191
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
1818
by: jenniferyiu | last post by:
IMHO, simply NO. False actually, practically.
32
9801
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
6797
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
1935
by: newstips6706 | last post by:
The Operating System of Organic Machines Building your own "KERNEL". --------------------------------------------------------------------------------
1
10255
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
3781
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
9589
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9423
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10050
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9866
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...
0
8876
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7413
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
5448
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3570
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2815
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.