views:

1594

answers:

9

Is there a way to run .net based applications without .net framework installed. Is there a way to do this. Is there a software that can achive this. Commercial software is also possible.

Added:

Has anyone any experience with VMWare thin client?

A: 

The only alternative to .NET framework I know is MONO (for LINUX).

tekBlues
mono will run on windows, too.
Joel Coehoorn
Thx Joel, didn't know, great.
tekBlues
+12  A: 

You can use mono to static-link all the framework dlls you need.

Of course, that limits you to the mono implementation of the framework, which is getting better but is still incomplete in a few places.


Update:
Based on your various comments, my best suggestion is to use version 2.0 of the framework. That will install just fine on windows 2000 with no trouble, and you can target it from Visual Studio 2008 if you need to.


I'm also a little curious as to your windows 2000 requirement. Are you deploying to business or home environments?

Almost no home users have windows 2000. Home users ended up with (shudder)Windows ME instead, which was released about the same time, and for that reason have almost completely moved on to Windows XP. You're more likely to see as windows 98 machine in a home than windows 2000, and not even Microsoft still supports windows 98.

On the other hand, an awful lot of businesses still use windows 2000 machines in large numbers. But business environments don't usually have a problem installing the .Net framework. They can even add it to machines automatically via group policy deployment if they have to.

Joel Coehoorn
I would rather back Mono's implementation and see the MS .NET be irrelevant. Not going to happen though.
Aiden Bell
Hmm very interesting. But since the framework dlls are LGPL, then your application must be open sourced. Am I correct? Also how large do the binaries become?
Unknown
@Unknown - not with the LGPL. If it were licensed under the plain old GPL, *then* you would have to open source all your code.
Jason Baker
@Jason, no that is incorrect. If you statically link LGPL libraries, then the enduser is not able to recompile the application using their own version of the LGPL libraries (requirement of LGPL). Thus you must open source. Thus, you must dynamically link LGPL libraries to avoid this.
Unknown
No way to open source my application.
crauscher
I would not use mono on Windows. It is lacking some features, and it is not as stable in my experience. The only time I use mono is to target Linux or OS X.
Dana Holt
@TwistedAphid: when did you last try it? It's come a _long_ way in the last year or so.
Joel Coehoorn
@Unknown, that's not strictly true. If you, you know, actually read the LGPL, you'll see (in section 6) that you can statically link as long as you also provide a way for the end user to modify the LGPL portion. For example, you could provide LinkedWithMono.exe under the terms of your choosing as long as you also provide JustMyAssembly.exe and Mono.zip so the end user can change the Mono portion.
Iceman
Downvoter: is there a reason?
Joel Coehoorn
+4  A: 

Use Mono, it is developed by Novell and is open-source

http://en.wikipedia.org/wiki/Mono_(software)

Aiden Bell
I don't think the question is so much about install *the* .NET framework as about installing *a* .NET framework. Mono is still a .NET framework.
Evgeny
+13  A: 

There are a several different tools out there, a couple I have tried are:

You can find more by doing a search for ".NET Linker."

The two above, which I tried, seemed to work ok, but I never widely tested my code built with them. I tried them mostly out of curiosity.

My .NET apps are mostly used by IT departments. Installing the .NET framework is no big deal for them.

If you want to write software more targeted at end users then the .NET install may turn them off.

Dana Holt
What are your experiences?
crauscher
What platforms did you target?
crauscher
I did my testing with MS .NET 2.0 on Windows XP and Server 2003.
Dana Holt
Did your applications work?
crauscher
@crauscher - Yes, they seemed to work fine, but I did not fully test everything.
Dana Holt
+1  A: 

If you mean "Can I run a .NET application without having to install a framework at all?" then the answer is no, you cannot.

If you mean "Can I run a .NET application without having to install Microsoft's .NET framework and CLR?" then the answer is only if you can find an alternative, and Mono is the only one I know of.

Ari Roth
Actually, there are some tools out there that claim to allow you to statically link all the necessary bits and bytes to your app, and then run that on a clean e.g. XP system without any .NET framework or Mono installed. Not that I think this is a good idea - it's bug-prone, it will balloon the size of your app, and really in the end - what have you won? But it appears to be possible.
marc_s
I agree that it's not a particularly good idea. It may be possible, but I would say that especially for beginners it's better to just assume that no, you cannot run a .NET app without a Framework/CLR of some kind. May as well learn the right assumptions when figuring this stuff out. :)
Ari Roth
+2  A: 

You did not mention the type of software that you were looking to run so I figured I would add my two cents.

Microsoft has released Silverlight, a .NET based browser plugin, and they have been working with Novell to put out a version of Silverlight based upon the Mono compiler mentioned above called Moonlight. Microsoft natively supports Windows and Mac OS X 10.5.

If you want more information here are some links: http://en.wikipedia.org/wiki/Microsoft_Silverlight http://www.microsoft.com/silverlight/

John Bellone
A: 

In the interests of completeness and something to consider along with the responses re MONO.

Have you thought about maybe writing the app in native code instead? That way you can simply just deploy your exe. If you need a RAD environment for productivity, then tools like Delphi or C++ Builder will give you a very FCL like feel (Delphi's VCL was architected by Anders Hejlsberg before he moved to MS, so probably no co-incidence that C# feels very familiar to Delphites)

Tim Jarvis
+2  A: 

My team faced a similar problem. We needed to run our .NET 3.5 WPF app under Windows PE, which has no usable .NET framework. I evaluated all the options and found Xenocode PostBuild to be the best.

It's GUI is a bit counterintuitive and there were some bumps in the road getting it working, but it's been reliable since.

If you go that route, be advised you need to make sure your code is fully debugged before you generate the unmanaged executable, as you cannot debug the resulting app (unless you like assembler).

Also note that embedding the .NET framework makes for a big executable. ~20MB for 2.0, and ~40MB for 3.5.

anelson
Which linker software did you try?
crauscher
Xenocode PostBuild, the product we ended up using, does the whole thing, including building the final executable with the .NET fw built in.
anelson
+2  A: 

This really sounds like more trouble than its worth when you are working with an OS that supports .net.

.net 2.0 I think even comes down as a Windows Update these days, its only 26mb, and you only install it once. If you want something thats win32 native go back to unmanaged C++.

Also check out: SmallestDotNet (although not windows 2000, it mentions that "Soon, Microsoft will release a super-small download for XP SP2 machines that have no version of the .NET Framework".)

Brendan Kowitz