views:

149

answers:

3

I am using Visual Studio 2010 to create a Setup package to install a WPF application. I can see that I can add the .NET framework 4.0 as a pre-requisite, but how do I get his to run automatically without manual intervention?

Do I have to create a small program (that targets framework 1.1 as I assume most machines have 1.1) that detects if .NET framework 4.0 is there and if not install it silently, or can I get the installer to do this.

I also have to install the OLEDB 12 drivers because I'm connecting to an Access 2007 database, so I will also have to run this installer before my application is run.

I don't want the install to download and install the framework, I want to include the framework redistributables with the setup.

Any help would be appreciated.

Thanks

A: 

You need to include .NET redistributable executable in your setup package. Check this article - its talking about Widows App, VS 2008 & .NET 3.5 but same thing should apply to you as well as.

VinayC
Thanks for that, however... after reading the document it appears as though the files are deployed for manual installation. I already have this, I would like it to be automatic. i.e. When the install runs, the install checks if the framework is installed, if not it installs it.
Adrian
A: 

In FW 4.0 you can have you program running under a "Client Profile" that is a light version of the framework that takes around 30MB and can be part of the installation. This works only if your software is light and doesn't use libraries that are outside of the "Client Profile". If your program can't be compiled using a "Client Profile" and you need the whole framework there is no way of adding the whole framework to your installation and you will need to supply a link for download or supply the full FW installation with your program.

There are 2 installations. a light installation that actually downloads the fill package from MS and a full installation, around 300MB. Both can be downloaded from MS.

Gilad
+1  A: 

You want to do bootstraping, using visual studio 2010 and .net framework 4, as explained here.

louisgab