Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I distribute C# apps to computers with an unknown version of .Net?

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

like image 446
edude05 Avatar asked Jun 21 '10 15:06

edude05


2 Answers

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).

like image 179
Justin Niessner Avatar answered Oct 07 '22 05:10

Justin Niessner


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

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

like image 20
František Žiačik Avatar answered Oct 07 '22 05:10

František Žiačik