views:

91

answers:

5

Hello.

I'm developing an application in C# based on the .Net Framework. The problem is that on certain computers there is no .Net. So is there a app (preferably free) that can check it and suggest a download if no .Net is available that i can run during the installer, or an app that wraps my assembly with the .net assemblys so that i wouldn't have to have .net insalled in order to run?

Note: I am using the nullsoft installer. And I need to install the 3.5 framework.

Thank you very much.

+1  A: 

Create a setup/deployment project in .NET. If .NET isn't installed when the user attempts to install your application, the installation wizard will force your end user to download the .NET framework through the GUI.

George
+3  A: 

Two ways to handle this. You need to make a list of prerequisites for your app. You at least need to specify the minimum Windows version that you are willing to support. And you can add the requirement that the Windows install has the .NET framework version you need. The vast majority of machines will meet this requirements list.

Or you could create a Setup project for your app. The bootstrapper that installs .NET will automatically be added, takes about 5 minutes to get this done. Not supported by the Express edition.

Hans Passant
+2  A: 

I'm not sure what you are using as an Installer, but an easy and free option would be to use a Setup and Deployment Project in Visual Studio.

Once you add the output of your main project to the Setup and Deployment Project, the Framework dependency will be detected and the user will be prompted to install .NET if it is not already installed.

Justin Niessner
+1  A: 

if you are creating the installer through deployment project then there is a prerequisite settings in which you can specify whether to bundle .net framework along with your installer or have it downloaded from the internet

ajay_whiz
A: 

I'm not familiar with the nullsoft installer, so I can't help you out there, but Microsoft provides "redistributable" packages for the various versions of the .Net framework for the purpose of including it with the deployment of your application.

If you anticipate having to install it on a machine that doesn't already have the correct version, then you might be able to add a step into your installer to execute the redistributable, which you would include in your deployment package.

A direct link to the 3.5 redistributable is located here. The download webpage is here.

It's up to you whether you want to do this; it looks like a 22 MB file, so if size is a concern for you then it might be a better solution to include a condition that prompts the user to download and install the correct version. As I mentioned, I'm not familiar with the nullsoft installer, so I can't advise how to do that.

Dr. Wily's Apprentice