The latest deployment technologies are simpler to use and provide an easily understandable method of performing the same steps as the earlier technologies. However, in older versions of Visual Studio, we might only have access to the older Visual Studio Installer project types, so let's first investigate the standard Setup Project:

After adding a Setup Project to the solution, a page opens up showing the file system on the target computer. On this File System Editor page, we can specify what we would like to install and where. The page is divided into two, with a tree View of the folders to be installed on the users' computers on the left and their folder contents on the right. By default, the left pane contains the Application, Desktop, and Program Files folders.
If we would prefer to use other predefined locations, such as the Fonts, Favorites, or the Common Files folders, for example, then we can right-click on the background of these panes and select the Add Special Folder option. Typically, we would add a standard folder with our company's name into the User's Programs Menu folder and add a further folder named after our application into that.
However, if we want to install our application as a 64 bit application, then we'll need to use this option to add the 64 bit Program Files folder to install into. To do so, we need to right-click on the File System on Target Machine item at the top of the tree View, select the Add Special Folder option, and then select the Program Files (64-bit) Folder item.
Note that we should only perform this step if we want to have a 64 bit installation. We then need to set the project output of our startup project to the folder in the left pane, which represents our installation folder, whether 32 or 64 bit.
We'll need to right-click on that folder and select the Add option and then the Project Outputs option from the contextual menu, and then select the Primary Output option that relates to our CompanyName.ApplicationName project. After doing so, we'll see a copy of the executable and other dependent files from its bin folder being included in our selected application folder.
Next, we can create a shortcut to our application on the machine that it was installed on by right-clicking the icon for the project output in the right pane and selecting the Create Shortcut to Primary output from CompanyName.ApplicationName (Active) option from the menu.
We need to give it the same name as our application and set an icon for it, which we can do in its Properties window. We can then click and drag, or copy and paste it to the User's Desktop folder, or to whichever folder we want the shortcut to appear in.
In addition to the executable and shortcut files, we can right-click a folder in the left pane and select the Add option and then the Folder and/or File options from the contextual menu and choose any other files that we may need to install on the user's computer. Once we have finished configuring the File System Editor, we can right-click on the project node in the Solution Explorer and select another page to edit from the View menu.
The Registry Editor page is next, and it enables us to make entries in the Windows Registry of the host computer. The left window pane acts as the registry View of the target computer, and we can use it in the same way as the Registry Editor to add new keys. This page also allows us to import registry keys from a .reg file if we right-click on an empty space and select Import.
The File Types Editor page follows in the View menu and enables us to associate any custom file types that we may have created with our application. In doing so, after installation, Windows will then open our application whenever a file of one of the types specified on this page are clicked.
The Setup Project enables us to display a number of default dialogs during installation, such as welcome, confirmation, and completion dialogs. It also provides the ability to reorder or remove these default dialogs, or add new ones from a predefined list. Each dialog provides an image field and different options, such as whether a progress bar should be displayed, or what text to display at different stages of the installation. This is achieved on the User Interface page.
The Custom Actions Editor page enables us to specify assemblies that contain code in a particular form, that can be run after the application has been installed. These actions could be anything, such as popping up a small form and providing the user with some configuration options, or simply opening a particular web page after installation has completed.
The final option in the View menu of the Setup Project opens the Launch Conditions Editor page. Here, we can specify prerequisite conditions that must be satisfied in order for the application to be installed. For example, we might require a particular version of the .NET Framework to be installed, or the host computer to have a particular registry key setting.
Once the project pages have all been appropriately completed, we just need to build the Setup and Deployment project to generate the setup files. However, we need to ensure that we build it correctly, dependent upon the selections that we made on the File System Editor page.
For example, if we wanted to have a number of setup projects, let's say including 32 bit and 64 bit installations, then we need to only build the 32 bit version of the Setup Project in the 32 bit solution platform and only build the 64 bit version in the 64 bit solution platform.
We can do this in the Configuration Manager in Visual Studio, which we can open from the last option in either the solution configuration or solution platform drop-down controls. If the x86 and x64 solution platforms do not already exist, we can add them by selecting the <New...> option from the solution platform drop-down control in the Configuration Manager dialog window.
To add the new solution platforms in the New Solution Platform dialog that opens, type either x86 or x64 in the Type or select the new platform field, select the <Empty> option from the Copy settings from drop-down control, and ensure that the Create new project platforms tick box is checked.
Once we have these two solution platforms, we can select them one at a time in the Active solution platform drop-down control in the Configuration Manager dialog window and tick and untick the relevant setup projects.
Here is a screenshot of the x86 solutions selected:
Here is a screenshot of the x64 solutions selected:

Note that we must select Release in the solution configuration drop-down and then build our project to generate the setup files. If we have set up our build configuration correctly, then building the x86 solution platform will generate the 32-bit setup files, and building the x64 solution platform will generate the 64 bit setup files.
It can be useful to uncheck the Build tick boxes for our deployment projects on all solution platforms when the Active solution configuration is set to Debug. Doing this will stop the deployment files from being regenerated every time that the solution is built while debugging and will therefore save time during any future development.