CodeByte

Write your code smartly

Tag Archives: .net setup and deployment

Setup and Deploy your .Net application

Today I will step by step guide you how you can create a “msi” (Microsoft Installer) or “exe” file for your application, so your users can only download your setup file and install your created application.

Open Visual studio and select new project from file menu.In installed templates on the left you will see “other Project types” under that ==> Setup and deployment and ==> Visual studio installer. After that in project types select Setup project and name your setup project as your application name and press ok.You will see a the new project created in like this:

Now on your left you will see three folders displaying, Application folder, User’s Desktop and User’s Program Menu.

  • Application folder is the one installed on the drive of the user with the running “exe” of your application.
  • User’s Desktop shows here that your application will have a shortcut on user’s desktop or not.
  • And User’s program menu means that will there be a running “exe” shortcut showing up in the start menu or not.

Now setup or project. On application folder right click and Add==>File

Click on file and browse till your project’s folder ==> bin==>debug==> your “exe” file of the project. Remember it will be in (*.exe) format.

Also you have to add the required framework setup exe which is required to run your application. add similarly framework 4 setup if you have developed your application in .NET framework 4.0, add framework 3.5 setup if you have developed your application in .NET framework 3.5, and so on, in the application folder.

Select User’s Desktop folder and right click on the window showing on the right side of the project and ==> Create new Shortcut.

Click on Application Folder and press Ok. After pressing Ok you will see your added exe file , select it and again press ok. This will add the shortcut of your application in user’s Desktop folder. Similarly do it for User’s Program Menu.

One last thing is select your Application folder and in the property window set your Always Create Property to “True. Do this for User’s Desktop and User’s Program Menu also.

Now build your project by ctlrl+shift+b. You will find your msi file in the folder location of the this project where you created it or saved it.

Your feed back is more important for my future work 🙂

enjoy!

Design a site like this with WordPress.com
Get started