C# Tutorial 89: How to Publish an Application in C# and Make the Installation Setup



hello guys welcome once again in this video I will show you how to publish your fully developed c-sharp application not only c-sharp application but any application which you have developed on Visual Studio I will show you how to publish that application and make a setup for that so let's get started in the last video I have shown you this project in which you can enter any word in this text box and when you press search its search for the word in this list and highlight it okay so I'm going to use the same project for this demonstration so first thing is you what you can do is you can go to your solution and go to this open folder in Windows Explorer and you can go to the project folder bin and debug and you have this executable file and you can use it but it's not recommended and it's kind of unprofessional when you copy this executable file to the other computer maybe so your project may have some dependencies like DLL file or documentation file or other dependencies and then you could not do this so I'm going to show you other way of doing this so the other way can be you just right-click your project go to the properties and you can go to this publish tab and there is nothing right now and now there is so you can go to this publish tab and if you want to publish your project on some website or server or some file path you can give it from here or you can give the URL of the web website from here so the other way is like this if you have or if you want to publish your application online then you can use this and the last and the recommendation setup which you can do is is like this so you have the solution and a project so just right-click your solution and go to add new project and just go to this setup and development in other project type so when you see it you have this other project type go to setup and development and then go to visual studio installer and we are going to make a setup project and we can give our application any name so I will give it list box search setup ok so I have given the name to my application and by default you will see that it's the same folder in which your list box search other project is there so you are creating your project in the same solution that's why this folder will be same as your project and now click OK and you will see something like this okay so now go to your project this is your setup project and you right-click it and go to add and click project output and here you can see a different of options what you want to package for example only the primary output you want to package or debug symbols or source code or documentation file you can select them what you want to package in your setup right now I just want this output of my project so I am selecting primary output and here you will see the project for which you are making the setup so a project name is list box search project so make sure you select this if you have multiple projects and select primary output and click OK now you can see primary output from search takes list box search which is my project now once you have done that you can go to this build tab and you go to batch build why we are going to the batch build because we have two project in one solution if you have only one project then you could have gone to this build solution and you could have gone for build list box search set up differently but together if you want to build your application both project at the same time just click this batch build and you can select you want debug build and release build all so so I am selecting all force so it will generate debug solution and the release solution also for both of my project my list box project and my setup project okay once you have checked all four things just click build and it will build one by one all for project files two for this debug and release and two for this debug and release and then you will see here build succeed that that means of build is succeed this build is successful now and once again we go to our project folder or solution folder they say this was our solution folder and you will be able to see this this box search setup which I have created new and this was our old project which contains our executable file so what I will do is I will go in this list box search setup folder which I have created and the new project and it contains debug and release folders so you can go to this list box setup debug folder also or you can go to release folder I am going to this release folder and I will double click it and I will start the setup of my application so it starts the setup wizard as any installer will start and you can just click Next and you can give the folder location where you want to install your application so you can I want to install my application in desktop for example so I will search for desktop users and the desktop ok so I want to install my setup executable file on the desktop so I selected the desktop and you can choose who will be able to access this executable file I click everyone and I will click Next and it will ask you whether you want to confirm or not so are we click Next and you see here the installation of my project starts so it will take maybe few seconds depending upon the size of your project so now you can see installation complete and the list box search setup has been successfully installed in my system so if this is correct then I should be able to open my list box search project on my desktop so I will go to my desktop and you can see here list box search this is my project and I will just double click it and my project start from here and I can just run my project I want to search Australia and ice it search and search the word in the list so in this way you can make a setup for your application and you can publish your fully made c-sharp application or more generally your fully made Visual Studio application I hope you have enjoyed this video please keep watching these videos and please rate comment and subscribe and bye for now

32 thoughts on “C# Tutorial 89: How to Publish an Application in C# and Make the Installation Setup

  1. Guys, you may learn socket programming in C# .Net in my online course at Udemy. Special discount promo codes are given below
    https://www.udemy.com/tcpip-socket-programming-for-coders-using-csharp-net/?couponCode=HALF

    https://www.udemy.com/udpsocketprogramming/?couponCode=HALFPRICE

  2. thank you sir for lesson, it great, i want to develop a school management system in c# and sql 2014 but don't know how to to do it well, please can you do a video on that since most developers are doing it hindi and urdu, most of us don't understand . so i wish you will do one for me in English. and please ho can i decompile an setup and re-Assembly it. thank you. [email protected]

  3. This was great thanks. I was missing the Batch Build option on my Visual Studio, but I just right clicked on the Setup part and Build that part on it's own.

    Just one thing – I have images and MP3 files that I need to store in the C:Program FilesApplication folder as well. How do I include those files in the installer, anybody know?

  4. you can download Microsoft VS installer projects from these inks and after that you will be able to view setup and development

    VS2013 >> https://marketplace.visualstudio.com/items?itemName=UnniRavindranathan-MSFT.MicrosoftVisualStudio2013InstallerProjects

    VS2015 >> https://marketplace.visualstudio.com/items?itemName=VisualStudioClient.MicrosoftVisualStudio2015InstallerProjects

    VS2017 >> https://marketplace.visualstudio.com/items?itemName=VisualStudioClient.MicrosoftVisualStudio2017InstallerProjects

  5. Is there a way to have a custom logo for your shortcut or app? also it would look nice to have a splash screen before setup dialogue box appear.
    is it possible with this visual studio setup project template?

  6. Awesome Sir, Thank you very much for your lectures, It helps us a lot.
    I made first ever Software today. Hurrah!

Leave a Reply

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