Portability of code

  • Thread starter Thread starter Lisa
  • Start date Start date
L

Lisa

Hi,

Can I write code for the .NET Framework using Visual
Studio .NET and then just deploy the installation file in
another Operating System?

To which extent is .NET Code portable?

Thank you,

Lisa
 
Ignore the below...

Depends on the platform the .NET framework is required on
the machine you wish to run the code this is usually a
windows 2000 or greater machine. .NET compact framework
is now supported on most smart phones and pocket pc's but
you need VS 2003 to program. .NET isn't currently
supported to my knowledge on UNIX, etc
 
Avoid PInvoke also.

Yes use the Microsoft.* namespaces if you want to port to mono on linux,
very well said.
 
THe idea and concept of a managed runtime is to prevent you from porting,
the runtime is ported,m not youre code.
 
Ok, now I became sort of confused.

I develop using C#, naturally always using MSCORLIB.DLL.

I am not given the possibility to execute C# in a MAC;
UNIX; Lindows box, say, since there is no mechanism (CLR)
to understand my code, such as .NET Virtual Machine
(Like Java VM).

Only one possible answer here: Is MSIL fully portable?

If not, then I believe that the only truly portable code
you can develop using .NET is C and C++ (unmanaged) code
and some stuff such as Pascal and scripts.

As for the rest, well "Windows is just too much of a
comfortable place to reside in...".

Any comments?
 
Mono, GnuDot net, and rotor and whatever one you can find, or make youre
own, thats what standards are about.

Unless you are going for enterprises and so on, forget money making on
linux, the only way you will get money out of that platform is by corporate
licenses.
 
Hello,

MSIL in and of itself is designed to be able to be run on other
machines. So, yes you can write something on Windows, copy to Linux and
have your code run (we have a production system where we did this exact
thing).

The issue is getting a runtime for your target OS. Microsoft makes a
full one for Windows. On MSDN, you can search for "rotor" and find a
shared-source one that runs on Windows, Mac OS X, and BSD(?).

At www.go-mono.com you can find versions to run on Linux and a variety
of other hardware processors.

All you need to be sure of is that the libraries you use are fully
supported on the target runtime, since not every one is fully implemented.

Hope that helps,
-mike
MVP
 
For all the Microsoft supportes this is great news, and for Java supporters
this is not good news. Although Microsoft has not released the source code
for Windows XP, like some diehard open-source supporters want, with the
release of .Net MS has made a big step in the right direction. With the
Net framework being ported to other operating systems the future looks
bright for .Net programmers. Who would have thought that developers using
VB.Net, ASP.Net, etc would be able to wirte applications that run on Unix,
Mac OS, and BSD. We know have what Java programmers have had for years, the
difference is that MS has also given us the best RAD development environment
with VS.Net and we can write applications that run on multiple OS better and
quicker than Java programmers can using J2EE.

No wonder McNeally (Sun) started attacking the open-source community and
blaming them for SUN not being able to compete with MS. Maybe if McNealy
woudl focus his energy on making JAVA better and producing a server that
could compete maybe then his bottome line would be better. To me if the
only way a company can beat their competition is by attacking them, then
they really don't have a product that can compete on it's own. the release
of the .Net framework and Micosoft total support to making the framework
code open so that other companies can port it to other operating systems is
the best thing that MS has done. This seems to be to be a risky move, since
sometime in the future the MAC OS / Unix version of the framework could get
to the point that programs run in those environments run better. In this
case MS could actualy start losing some of their OS market, bit in the long
run it could mean that more of MS commercial producs are able to be ported
over to the new platforms (Word, Excel, Outlook, Visio, etc). I honestly
think that McNealy called MS out when they got the DOJ involved, and .Net is
just the first step in MS response. Only time will tell if McNealy has let
the "MS Holy War" cause him to make some really bad decisions in the past
1-2 years, and how costly they will be to the Java community.

SSM

P.S. I am a MS programmer but do not have anything against Jave or those
that program in Java. I have actually taken some coursed in Java and
written a few JSP applications and really enjoyed using Java. I will also
be the first to admit that until .Net was released MS developers had a
development tools that was very good, but we were missing some important
features that were limiting us and causing our peers to look at us as second
rate programmer. Now that we have truly Object Oriented languages to work
with (VB.Net, ASP.Net, C#, etc) and a runtime that is being ported to other
OS, the sky is the limit (even if it meand we have to move overseas to get a
job).
 
For all the Microsoft supportes this is great news, and for Java supporters
this is not good news. Although Microsoft has not released the source code
for Windows XP, like some diehard open-source supporters want, with the
release of .Net MS has made a big step in the right direction. With the
Net framework being ported to other operating systems the future looks
bright for .Net programmers. Who would have thought that developers using
VB.Net, ASP.Net, etc would be able to wirte applications that run on Unix,
Mac OS, and BSD. We know have what Java programmers have had for years, the
difference is that MS has also given us the best RAD development environment
with VS.Net and we can write applications that run on multiple OS better and
quicker than Java programmers can using J2EE.

No wonder McNeally (Sun) started attacking the open-source community and
blaming them for SUN not being able to compete with MS. Maybe if McNealy
woudl focus his energy on making JAVA better and producing a server that
could compete maybe then his bottome line would be better. To me if the
only way a company can beat their competition is by attacking them, then
they really don't have a product that can compete on it's own. the release
of the .Net framework and Micosoft total support to making the framework
code open so that other companies can port it to other operating systems is
the best thing that MS has done. This seems to be to be a risky move, since
sometime in the future the MAC OS / Unix version of the framework could get
to the point that programs run in those environments run better. In this
case MS could actualy start losing some of their OS market, bit in the long
run it could mean that more of MS commercial producs are able to be ported
over to the new platforms (Word, Excel, Outlook, Visio, etc). I honestly
think that McNealy called MS out when they got the DOJ involved, and .Net is
just the first step in MS response. Only time will tell if McNealy has let
the "MS Holy War" cause him to make some really bad decisions in the past
1-2 years, and how costly they will be to the Java community.

SSM

P.S. I am a MS programmer but do not have anything against Jave or those
that program in Java. I have actually taken some coursed in Java and
written a few JSP applications and really enjoyed using Java. I will also
be the first to admit that until .Net was released MS developers had a
development tools that was very good, but we were missing some important
features that were limiting us and causing our peers to look at us as second
rate programmer. Now that we have truly Object Oriented languages to work
with (VB.Net, ASP.Net, C#, etc) and a runtime that is being ported to other
OS, the sky is the limit (even if it meand we have to move overseas to get a
job).
 
Put it this way, you are less tied to the windows platform if you use
platform NEUTRAL namespaces (SYSTEM.* or it should be) - and PInvokes (Use
..NET assemblies or COM components for cross platform - or CORBA probably).

You are tied to the CLI runtime and not the native OS, which isnt important.
Windows is a means to an end, now that has shifted more to the managed
runtime rather than the C runtime and Flat APIs.

All those that cry but im tired to windows, what are they coding now? MFC? C
and Win32? What is more locked in :D And avoid VB if you want cross
platform, its propriety (yes there are copies but they are best guesses and
I would not put my business eggs in that basket).

C# is big, java lost. Java like VB is propriety. This is where C# is the
win.
 
There is not benefit gained portability wise, whether you use C# or VB.
Both are tied to the CLR and have access to all the same namespaces. Yes,
there are some things you can do in c# that you cannot do in VB, and things
you can do in VB that you cannot do in C#. This is based on functionality
and has nothing to do with the portability of the code. When the .Net
Open-Source runtime is completed for Unix both VB and C# applications should
both run fine hitting the same Unix.Net framework. You could even use
Cobol.net and it would also run using the new Unix based .Net framework.
dotNet (not any one language, VB, C# ,etc) is a big win for Microsoft and
and a lose to Jave. You lose portablity when you use third-party COM+
components or Windows API calls.
 
Its reverse engineered like WINE. Definately something to put a company's
assets in.

Very secure investment, great support. Using a hacked product.
 
Its reverse engineered like WINE. Definately something to put a company's
assets in.

Very secure investment, great support. Using a hacked product.

True, but companies make worse investments. using any compiler for C# other
than MS's may well be a risk. Standard or not, implementation is vastly more
important.
 
Back
Top