Running .net based application without .NET Framework

Solution 1:

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

  • XenoCode Postbuild (now Spoon Studio) (now TurboStudio)
  • Salamander .NET Linker

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.

Solution 2:

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.

Solution 3:

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

Edit: Question was about running without an installed runtime regardless of "supplier". Even so, here is a link to Mono's wikipedia entry. Enjoy.

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

Solution 4:

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.

Solution 5:

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/