If you have ever installed any software in your machine, you know what I am talking about. A textbook meaning of Prerequisite is
“A thing required as a prior condition for something else to happen”
It case of software it usually means that to run some piece of software it need to have something else present already, it can be either another software or a hardware. For any application developed in .NET has first prerequisite is … to have .NET framework already installed on that machine !! And if you have created any installer for your application then you know that this prerequisite is automatically handled by installer itself but what if your application has special requirement of its own, that needs to be satisfied to make application work properly ? At first glance it looks like that you have to write some sort of funny code to handle this situation … but it is not entirely true. Writing some kind of code and include it in your installer via dll is one way to do that but there is more easy and a bit forgotten solution available …which requires less effort compared to first option …. it is Bootstrap Manifest Generator for Visual Studio 2008, despite of its age, this piece of application still works very well for VS2010 .. and I hope that it will work with VS.next as well.
This software creates a manifest file for a any software that you want to use as a prerequisite and then you can use this manifest file to include that item in your installer’s prerequisite list. For this post … say I have an application which requires to have Firefox web browser already installed on a machine where I will be installing my application ! Now in real life it will be very very strange requirement for any application, but just bare with me this one … ok ? Just like any good application installer, I will want to include setup of Firefox with my main MSI and if Firefox doesn’t exist on a machine then have it run before main installation starts. Available prerequisites for an application can be selected by going into Installation Project Property –> Prerequisites –> and then select what ever you want to have as a prerequisite … say .NET framework, Windows Installer, VC++ runtimes etc. But here you will see that Firefox doesn’t exist as an option to include as prerequisite. This is when Bootstrap Manifest Generator (from now on I will just call it BMG) comes in play. And in rest of post I will show how BMG can be used to add custom prerequisites for your installation project.