Steps to Create Setup and Deployment Project in Dot Net VS 2008

Step 1
Create your own windows application. Create a new Windows application project in C# and named it as Sample.

d01

Step 2

Design your own application. Here we have a simple login form for example.

d02
Step 3
After completing the design and coding, build the solution of the project in release mode.

d03

Step 4
Check the Release folder for the file “ProjectName.exe”. Here in this example we have the project name as sample so we can find a file with the name Sample.exe. Double click the executable file and check the example.

d04

Step 5
Create a Deployment Project. Select the “Other Project Types” -> “Setup and Deployment” -> “Setup project”. Here we have the setup project for example as “SampleSetup”.

d05

Step 6
Add the Sample.exe project application file inside the “Application Folder”.

d06

Step 7

To make a shortcut for the project right click “File System on Target Machine” and create shortcut of the application. Here in this example the project shortcut is created in program files folder.

d07

Step 8
Create the shortcut of the application.

d08

Step 9
Rename the shortcut of the application.

d09

Step 10
Move the Shortcut file to specified target. Note if you need another shortcut for some other target also create use same steps.

d10

Step 11
Now build the solution in release mode.

d11

Step 12
The setup file created in release folder of the project specified path.

d12

Step 13
Run the setup, step the path to extract.

d13

 

d14

d15

Step 14
The SampleSetup project is extracted and shortcuts are created. Now run your application.

d16

 

79 Comments

  1. nac says:

    Thanks for the detailed explanation praveen.
    After installation I want a custom action to be performed which would attach a mdb file with SQl server instance present on client machine. Can this be achieved?
    I am able to ship the mdb file along with setup.

  2. Musarats says:

    thanks alot for exact steps :)

  3. nilgoun says:

    thanx .it’s so usefull.

  4. Yogi says:

    Hi Praveen,

    Please let me know the procedure to create a setup file through which we can update the existing application of this setup.

  5. Rahul says:

    Its very useful for me.Thanx

  6. Huda says:

    thanks..
    i want to change the default icon of ny setup .exe file as well as icon which appear for the application after installing ..
    plz reply on my mailing address
    noorulhuda__sunny@hotmail.com

  7. Ramesh says:

    This one is very much helpful for me.. Thanks alot for detailed steps..

  8. Om Apte says:

    hey thamks for the help..
    Now that i have done this shortcut part, I am getting greedy. Do you know how to add Uninstall option to the shortcut on Start button->Programs

  9. sriram says:

    i created setup file and installed it on my computer..

    but i didn’t get any shortcutkey on my desktop. so please tell me where can i found the shortcutkey to run my application

  10. Kathir says:

    @sriram
    To Create the User Desktop shortcut key,
    1. Go to the “File System” tab in your project
    2. Select the “User’s Desktop” folder
    3. Right click on the files section and select “Create New Shortcut” in the popup menu.
    4. Now the “Select Item ..” dialog box will be opened. In this select the application for which the shortcut should be created.
    5. After the shortcut is created; if you want to rename it, select the shortcut and
    either press ‘F2′ or right click on that to select ‘Rename’ and rename it.

  11. Praveen says:

    @sriram
    Hi friend check the Step 9 and Step 10. It shows how to create the Desktop shortcut.

  12. jaya says:

    thanks for your help.It is really useful.thanks a lot………….

  13. naji says:

    really thank for this help and i hope we can know more about that later

  14. Urbandive says:

    Hi,

    I’ve been trying to change the shortcut icon so that it matches the application icon but can’t seem to get it right. Any idea ?

    Thanks,

    Manuel

  15. venkatesh says:

    Very good explanation with screen shots .
    It is understandable by any programmer..thanks a lot.

  16. Gagan says:

    Hi,

    this is very low level sample.
    we really need the advance one.

  17. ruwanthaka says:

    if this is very low level one it’s really helpful for a beginner on this topic.
    really good task, thanks a lot praveen.
    regards
    Ruwanthaka

  18. ruwanthaka says:

    even this is very low level one it’s really helpful for a beginner on this topic.
    really good task, thanks a lot praveen.
    regards
    Ruwanthaka

  19. javasoul says:

    Thanks its helpful.

  20. Hemant says:

    Owesome Man……
    Really good work…….

  21. madhu says:

    nice one.
    I need one more info. Is it possible to make our own executable file as a pre requisite

  22. mahrosh says:

    that is jus awesome explanation
    bt i gt .net framework 3.5 vs 2008 how to make setup & deployment in it…?

  23. Ratheesh says:

    THANKS DUDE

  24. Manju says:

    Excellent ,but if any databases like sql are used in our project,then how to create setup file?

  25. thanks For This Detailed Explation But I think This SetUp Required .Net Frame Work On Clints Machine Can ……….
    Can We Create SetUp In Which There Is No Requirement of .net Frame Work

  26. Daniel says:

    Just what I was looking for. Thanks.

    One thing though… Step 7 seems to be redundant. Or am I missing something?

  27. Anil Khajuria says:

    plz give example with step wise Discription

  28. Anil Khajuria says:

    Anil Khajuria :In Nteir Apllication Where You have N number Of Porject In One applicationhow we will make one setup for multipel project in one application

    Anil Khajuria :plz give example with step wise Discription

  29. Shawn says:

    This is very good guide for creating deployment program in C#.

  30. srinibas panda says:

    i have creat a setup and deployment of a project in .net .pleaze give the steps how i can run the setup file of the project in another computer ,where there is no visual studio is installed.
    send it to my email please.

  31. C.K. Dubey says:

    Its easiest process for creating set up.
    plz give e advice for creating set with Database and additional supporting file.

    Thanks

  32. Thanks for this explanatary file of setup.exe
    but it should be more explanatary as I am newer user..

  33. rajiv munde says:

    i have website developed in java and .net. now i m looking for deployment.
    can i deploy java application to tomcat in custom actions in setup projects.

  34. hamid says:

    thanks for your illustration.
    continue more on different issues.
    best wishes

  35. Renis & vipul says:

    it’s very very useful for me ….

  36. mahdiaction says:

    This is very good guide .

  37. Vinayak says:

    I am not able to get the image for the short cut. Kindly inform how to give image.
    I am also getting the error : Error signature:
    EventYype: clr20r3P1:Chartsup.exe P2:10.0.0.0 P3:4ca2c295 P4:chartsup P5:4ca2c295 P7:179 P8:10 P9: systemnullreferenceexception
    Report Details:…………

  38. praveen says:

    Hi Vinayak,

    Try the following step to get the image for short cut.
    1. Add a fav. icon in the application folder directory.
    2. Select the property window for the short cut file, in that set the ICON property by browsing the fav icon path.
    3. Then, Publish the setup.
    4. Now we will get the custom image for our short cut icon.

  39. thank your for your help, I needed this to make the installation for my application.
    can you make another tutorial for changing the default icon of the application? so when I create a shortcut for it on the desktop it will keep the good image quality, not distorted.

    thanks

  40. param thokade says:

    hello sir ,

    i want to create the setup of window application with attaching database file so how i can do that
    pls send me urgent reply

  41. shaik.Inthiyaz says:

    you are having good teaching skills ,this kind of explanation is required for freshers.
    i have a small dout
    can we Create a SetUp ,In Which There Is No Requirement of .net Frame Work on client machine.

  42. Rasha says:

    Hi A lot of thanks to you, you are the man :)

  43. adeel ahmed says:

    hello can u tell me how to make setup of a application having Sql database files with it i have created and when used it database doesnot worked on other PCs. please guide me ??????????????????????

  44. Aruna says:

    Very clear,thank you

  45. kanna says:

    Thanks 4 ur detailed explanation on Setup & Deployment….

  46. Gopi says:

    The procedure explained was so helpful for me…..thank you very much
    It is the easiest procedure to understand and implement…….once again thanks dude

  47. padmaja says:

    Thanks for your detail explanation about deployment.
    It was so helpful for me.

  48. george gulati says:

    I want to ask how can i add a mdf file to my setup project?????

  49. Lijo says:

    The above steps were very helpful.. But i also need to include the MDF file(sql server 2005) in my project so that i dont need to install sql server2005 on every machine. Plzz help me out with this….
    thank you in advance…

  50. Shashank Kulshrestha says:

    How to create a decktop icon for .exe file in C# windows application through setup

  51. Fikru Feleke says:

    very helpful, thank you.
    how to include product key and update patch ?

  52. sohail says:

    Thanks a lot Dear. U saved my life. Actually i was having some other problem , but i got a hint from your above description . Thanks a million.

  53. No2No2 says:

    Thank you very much ^_^

  54. Ron says:

    Why can’t I set an icon on User’s Desktop shortcut from Application Folder?

  55. Sachin Suryawanshi says:

    Thanks for this topic..
    But in case of SQL database and Crystal Report this
    logic is not working….
    Can you give all detail about adding reference files of
    Crystal report and SQL Database….

    Thanks…

    Sachin……….

  56. Uday says:

    Hi,
    Thanks for the explaining the way of deployement. I have a question as below:
    Is it possible to include some folders (e.g Images) which contains some files used in project? How can we achieve it?

  57. sam says:

    that is very use full
    but
    how can i add registry key?

  58. Kathirvel KG says:

    for that you can use any of the opensource products like Inno Setup, Install Jammer.

  59. Ahmed says:

    Than q for the post its working….!

  60. kaushal says:

    but how with built in sql database..i know that u show..bt i dnt know how can we create setup with bulit in database for big project..need u r advise…help me bro…

  61. Abhijith Shetty A says:

    thank you for your help..

  62. mona says:

    realy it is so useful thank you so much

  63. mona says:

    realy it is so useful thank you so much
    but how can i put icon

  64. mini says:

    I am using wcf service and this proces sis not working in that case it cannot find endpoint for the service

  65. Kedir says:

    thanks*100000000

  66. Amrik says:

    Than q for the post its working….!

  67. Hi All,

    I am create setup file with database how i can implement this.

    please help me. Plzzzzzzzzz..

    Thanks & Regards

    Abdhesh
    9999208994

  68. solution sent on my email id.

    please help me.

  69. vedu says:

    helpfull for begimers

  70. hari says:

    send us how to deploy a web application…….

  71. Yididiya says:

    Awesome. 11q

  72. Sandip Modi says:

    Thank you for help.
    but i want to add my database file in to this .exe file.

  73. shiv says:

    thanks,solve my problem and save my time.

  74. AVRDUDE256 says:

    THANK U SO MUCH FOR THE DETAILED EXPLANATION

  75. subbeylal says:

    yaar samajh mein nahin aaya ki release kahan se aayega thoda open batao

  76. mohammad Reza says:

    That Was Very Helpful,
    Thanks, Very Much.

  77. cskumar says:

    many many thanks to you

  78. Rajesh says:

    it’s work but can say me about how to connect remote database

Leave a Reply

Your email address will not be published. Required fields are marked *

*