views:

132

answers:

5

I wrote a small app that I need to distribute to 700+ computers, the problem being that the computers can be running any version of Windows (though most likely XP or better) with any version of .Net framework installed with internet connections all from OC3 to dialup.

I considered bundling .Net with my application but the .net installer is at least 39mb and that would literally take hours for someone with dialup.

So is there a way I can either bundle the specific DLLs that the application needs, or convert the whole thing to native code?

Thanks --Mike

+11  A: 

Use an Installer.

Microsoft provides a basic solution so that you can check for dependencies (and install them if they are missing) to ensure that the computer you are deploying your application to meets minimum Framework (and dependency) requirements for your app.

If you need something more complex, you can use something like the Nullsoft Scriptable Install System, InstallAware, or InstallShield.

Keep in mind though, if you're creating a .NET application, that the user is going to need to install the runtime one way or the other. An Installer makes things nice by not forcing you to bundle the .NET installer with your app. It will allow the user to download the .NET runtime at install time.

If you want to remove the dependency on the .NET Framework, then you're going to have to rewrite your application in something that compiles down into native code (even NGEN won't work without the Framework being installed).

Justin Niessner
That would, however, not prevent that the clients need to download the large framework if they don't have it.
František Žiačik
For the percentage of users that (a) are on dial-up (only 10% of all users in the US), (b) don't have the framework already, and (c) have no other means of getting the framework.
Joe
You don't actually have install the framework, you can just include the dlls in the install, if you set Copy local to true on all of the needed dlls and then package them into the install
msarchet
@msarchet: This is not correct. The framework *must* be installed for a .NET application to run. Full XCOPY deployment of a .NET app (meaning not requiring the framework to be present on the target machine) is 100% impossible, I'm afraid.
Adam Robinson
@msarchet: That's ridiculous. It's like saying you don't need a foundation to build a house!
SoftwareGeek
A: 

If they don't have the runtime environment you need, you're pretty much out of luck with a .Net solution. With an installer, you can install the appropriate runtime environment if it's not there.

Really, if you are absolutely concerned about people downloading part of the framework, you best bet is to not use it. Before rewriting the app in native code though I would really look at your audience to see how likely it is that they don't have it, and what is their connection speed.

If you don't want write it in native code, your other bet is to use a lower version of the framework. The market penetration will be much greater for 1.1 than say 4.0.

Kevin
Minor point, I'm not sure that 1.1 would be a good option, I think that's not installed on newer Windows versions, so if someone went down the way of using the most common .Net version they should probably research 1.1 vs 2.0 in their userbase.
ho1
A: 

From Wikipedia (not the absolute authority, but usually reliable about this sort of thing):

Windows Vista includes version 3.0 of the .NET Framework.

So Windows 7 will include this as well.

Therefore, it's only really your XP clients you have to worry about.

I recently had to reinstall Windows XP and by the time I'd got SP3 and all the subsequent patches I had .NET 3.5 installed as well. Though as I was installing Visual Studio as well I can't give you a 100% guarantee that everyone will have the necessary version of .NET installed, but it's going to be a significant proportion, so you might be worrying unduly.

ChrisF
+1  A: 

It's possible to be done, but not an easy or cheap way.

For example, see http://www.remotesoft.com/

František Žiačik
A: 

Don't use .NET. If you have no control over the enviornment, need wide distribution, and don't want to require 30 MB download, then you are pretty much stuck using native code. Your best bet would be C++.

Alternatively, as others have suggested, you could try using something like Remotesoft.

Scott Wisniewski