Setup Project Deployment in VB.NET 2005 - Part II
< Continued from page 1
To get started, I repeated the basic install steps in Part I of this series:
--------
Click Here to display the illustration
Click the Back button on your browser to return
--------
If you decide to create your own setup, you may find that it's a real pain to use Add/Remove Programs in Windows Control Panel before each test of your setup.
If you simply add one to the setup project Version property (that is, if it's 1.0.1, then change it to 1.0.2), you will be asked if you want to change the ProductCode property too. Click 'Yes' and the new setup will install over the old system. There's a lot of misinformation about this (including some at the official Microsoft MSDN site). This worked with my install of VB.NET 2005!
In addition, the default for Visual Studio .NET is to not rebuild the setup project when the entire solution is rebuilt. To change this and build both the application and the setup project when the solution is rebuilt, right-click the solution in Solution Explorer and select Configuration Manager. Click the Build check box for the setup project.
--------
Click Here to display the illustration
Click the Back button on your browser to return
--------
In common with the rest of Visual Studio .NET, the big problem with creating setup projects is that there are just so many choices and options that it's difficult to even list them all.
(There are big books that try.) I decided that the best way to get around this problem was to simply show how to do a specific set of goals for a setup project. Most of this list can be accomplished by using the File System Editor designer.
Here's the list:
Since our goals involve the File System Editor designer, let's take a closer look at that first.
--------
Click Here to display the illustration
Click the Back button on your browser to return
--------
When you click the icon for the File System Editor, a window showing a short list of three default folders is displayed in Visual Studio:
These are just the most commonly used folders. You can add links to other folders by right-clicking in the directory pane and choosing Add Special Folder. In this way, you can have as much control as you need over the file system that is installed in the user's computer, the File System on Target Machine.
To get started, I repeated the basic install steps in Part I of this series:
- I added a setup project to my application, named FourElements.
- I added the application Primary Output (this is the executable created by the application) to the setup project.
--------
Click Here to display the illustration
Click the Back button on your browser to return
--------
If you decide to create your own setup, you may find that it's a real pain to use Add/Remove Programs in Windows Control Panel before each test of your setup.
If you simply add one to the setup project Version property (that is, if it's 1.0.1, then change it to 1.0.2), you will be asked if you want to change the ProductCode property too. Click 'Yes' and the new setup will install over the old system. There's a lot of misinformation about this (including some at the official Microsoft MSDN site). This worked with my install of VB.NET 2005!
In addition, the default for Visual Studio .NET is to not rebuild the setup project when the entire solution is rebuilt. To change this and build both the application and the setup project when the solution is rebuilt, right-click the solution in Solution Explorer and select Configuration Manager. Click the Build check box for the setup project.
--------
Click Here to display the illustration
Click the Back button on your browser to return
--------
In common with the rest of Visual Studio .NET, the big problem with creating setup projects is that there are just so many choices and options that it's difficult to even list them all.
(There are big books that try.) I decided that the best way to get around this problem was to simply show how to do a specific set of goals for a setup project. Most of this list can be accomplished by using the File System Editor designer.
Here's the list:
- Change the name of the program folder for the application.
- Add a Readme.txt file to install folder.
- Add custom icon for the application. I use the red ball in the About.Com logo.
- Add a shortcut to the application into the Windows Programs Menu.
- Add subfolder to the application folder and install files into it. I use the icons that are also included as resources in the FourElements application.
Since our goals involve the File System Editor designer, let's take a closer look at that first.
--------
Click Here to display the illustration
Click the Back button on your browser to return
--------
When you click the icon for the File System Editor, a window showing a short list of three default folders is displayed in Visual Studio:
- Applications Folder
- User's Desktop
- User's Program Menu
These are just the most commonly used folders. You can add links to other folders by right-clicking in the directory pane and choosing Add Special Folder. In this way, you can have as much control as you need over the file system that is installed in the user's computer, the File System on Target Machine.