C# .NET - how to add Prerequisites to windows installer setup file

Asked By mostafa hamdy on 16-Sep-10 07:38 AM
Hello all
I have created some setup project using C#, and I want to add some Prerequisites to this setup file , how can I do that in the setup file not in code just using menus , because I dont know how to do it
please if any body know send me or tell me some url may help me in doing that
regards
Mostafa
Kirtan Patel replied to mostafa hamdy on 16-Sep-10 07:52 AM
Friend,

Here is your Solution .

if my answer helps you then check "Do you like this answer" check box please :)

you don't have to check it programatically because the Setup of your Program will do it for you . :)when you create Setup Project in visual Studio Just Add .net framework 3.5 as Dependency . and Build Setup now. when you run the setup setup will check if .net framework is there in system or not if it not find then it will install it automatically :) . you can create this type of setup by creating Setup Project .

Step 1:
In visual Studio >> File >> new >>Project >> Other Project Types >> Setup and deployment >>Setup Project .


Step 2 :
Add the exe(s) and other files in Application Folder of SetupProject

Step 3:

Now in Solution Explorer Right Click your Project >> Properties
Click Prerequisites Button and Check the packages you want to automatically installed if not present on system .

Step 4 :
Build the Project .

Step 5 :
you will get Setup :) thats it :)


Anurag replied to mostafa hamdy on 16-Sep-10 07:56 AM
Right click on ur project in solution explorer
Then click on publish
then u will see a tab named prerequisites.
Voila
javid replied to Anurag on 24-Nov-10 07:44 AM
 how to Create the Prerequisites list window in the dialogbox setup in visual studion ?

Kindly Please Help on this.
By
Javid