Distribute small programs without the .net framework

Brainbug

Member
Joined
Dec 29, 2005
Messages
17
Location
Hanover, Germany
Programming Experience
5-10
Hi,

is it possible for, say, really small projects which use barely any fency controls, to distribute (and run) WITHOUT any use of the .net framework? - Maybe there is a way to put the used controls and whatever in a single dll-file or something which allows the program to run without necessarily the 20 MB framework to be installed?

Would really like some hints about that, sucks to have to force the user to download that huge framework for a small application of 20kB ... :cool:

Thanks,

Brainbug
 
There are retail programs out there that will do exactly what you are asking. They work by indentifing the assemblies that you have used in the framework and then they copy those assemblies locally and link your app to them. I dont know how good they are and it sounds a bit dodge to me, but people must use them. Lets face it though 20 MB is not a lot of memory now-a-days and chances are if they are running one .net app i would say that they will probably run a few more in the future. As ManicCw has said you can deploy the framework with your application, you'll need the bootstrapper plugin for .net 1.1, .net 2.0 may be different. My advice, don't worry about little things like that.
 
Hi,

thanks for those answers. I am aware of the possibility to include the framework in my installation. But thats the point: WITHOUT that framework the setup would be some kB, INCLUDING the framework it's more than 20 MB - and it DOES matter, because sometimes users dont want to have to install something, in a particular case (in a corporation that wants to use a little tool of mine) it is simply not POSSITBLE (due to user rights) to install something on each employees PC - and why should they install some overhead-data which is never used by the application anyway?

Those retail programs you mentioned - do you have a name of one?

Brainbug
 
Consider that some businesses dont use an XP version. In fact I didnt know that .net 1.1 comes with XP SP2 - thanks for that information, but for example: in the special case I mentioned above, Windows 2000 is in use. So I still need a solution for those users.

Brainbug
 
You can't run a .Net application without the .Net framework being installed.

As ManicCW mentioned the same requirement for Java runtime, I would add this was always the same with earlier Visual Basic platforms that also required the small runtime to be installed if it wasn't already. Fiddling with dissecting the individual libraries of the framework to find exactly which ones are required for your application specifically is a stupid hack, and doesn't negate the fact that a .Net application can't run without any dependencies. Also the minimal C programs depend on core libraries, .Net is just a little bit more advanced and is not yet installed by default on any system.

You may if appropriate deploy your 22KB application.exe and simply tell them that if it doesn't work they have to install .Net framework from MS and give them the link to the redistributable. http://www.microsoft.com/downloads/details.aspx?FamilyID=0856EACB-4362-4B0D-8EDD-AAB15C5E04F5&displaylang=en
 
Last edited:
So what now?

It is said that there ARE possibilities to avoid the framework:
vis781 said:
There are retail programs out there that will do exactly what you are asking.
Now you say that's not possible - although you mention the possibility to "dissect the individual libraries". Whether it's a "stupid hack" or not, thats for every developer to decide: I can think of situations where a not-framework-depending "stand alone"-application makes a lot of sense. See my examples above. If you have to rip 80% out of the framework and attach it manually to your application, you are right: that would be stupid. But a lonely form, using, let's say, a FileListBox and a PictureBox - that program has no need for 20MB framework-data.

Brainbug
 
When you start a fresh Windows Application project there are some referenced libraries by default needed to make things work. You got the core functionality (how did this all start?), data functionality (how is all this connected?), drawing functionality (everything you see in a computer display is drawn), forms/control (complex controls as forms/labels/textboxes etc), Xml functionality (have you inspected the source files? like .vbproj its all xml). If you see the screenshot these minimal dependecies is listed.

Below I have listed the dll files and their sizes, adding them up goes 15.748KB for starters, and how do you know if these dlls require additional other libraries to operate? You don't, but we get close to the full .Net framework installation for even the basic one form application.
VB.NET:
System               mscorlib.dll              4208KB
System.Data          system.data.dll           2812KB
System.Deployment    system.deployment.dll      864KB
System.Drawing       system.drawing.dll         684KB
System.Windows.Forms system.windows.forms.dll  5192KB
System.Xml           system.xml.dll            1988KB
                                              15748KB
I would say it is not for every developer to decide which part of framework to install, but rather a decision what and how much to add on top of the framework. Of course a developer may elect to not develop with .Net framework as a base.
 

Attachments

  • untitled.jpg
    untitled.jpg
    13.7 KB · Views: 194
Unused References

Visual Studio 2006 is able to remove the unused references from that list above, remaining

VB.NET:
System               system.dll                4208KB
System.Data          system.data.dll           2812KB
System.Drawing       system.drawing.dll         684KB
System.Windows.Forms system.windows.forms.dll  5192KB
... but still this are about 10 MB.

Now what about programs that are able to rip the needed parts out of that dlls - it is very unlikely everything thats in there is needed everytime, isnt it?

Brainbug
 
Last edited:
To muck complication for nothing. If you install that app with some "short" framework what will happen if you need to install second .net app or to update existing using some new dll's? I think you shold include framework in your install procedure, but that's just me :)
 
JohnH said:
You can't run a .Net application without the .Net framework being installed.

Actually you can. BrainBug Check Out 'Xenocode' They have an applicatin called 'PostBuild' Or at least i think that is what it is called. Anyway it's on thier website and thats the program you will need to run your .net app without the whole of the framework.
 
Actually, I don't agree with your conclusions vis781. Just because Xenocode can rip out and attach parts of the framework relevant to only this particular build of application doesn't mean that it can run without the framework per se. It only means that these parts of the framework is distributed regardless of framework is already installed or not, and redistributed for every single build again.
Xenocode Postbuild 2006 automatically identifies and statically binds a minimal set of Framework dependencies
 
These aren't my conclusions JohnH, I'm not the person who designed the program or the website. Just if you were to read a bit further you would have found this....

Run anywhere: Native x86 executable generation allows your .NET application to run anywhere, with or without the Framework. (Windows 9x and NT4 targets not supported.)

I haven't used the program myself nor am i going to get into a pointless discussion about the intricacies about whether or not is works. The question from BrainBug was do i have to install the framework for my .net app to run. Going by what that quote from xenocode's website says, i would say that the answer is a resounding No.
 
Thank you very much, the first really helpful hint. I will check this out!

nobody said:
Native x86 executable generation: Compiles assemblies into native x86 executables, allowing .NET applications to run immediately on machines without the Framework installed.
This seems very promising!

Brainbug

PS: By the way - I am not interested whether the framwork is already installed or not, I just want to make sure that my application installs & runs within minimal time and with least effort to the user. If the framework is already installed, the better! But if not I want to deliver the needed dependencies (as stated above understanding that my application is very small and doesnt need the whole framework - if it does, the integration of the .net framework in the installation would be the easiest way, of course).
 
Last edited:
Back
Top