
Figure 18-40
These three files will be copied to the user's computer during the installation.
The next step is to configure the MSI installer to perform some custom actions during the installation stage. Right-click the RSSReaderSetup
project in Solution Explorer, and select View→Custom Actions (see Figure 18-41).

Figure 18-41
The Custom Actions tab displays. Right-click on Custom Actions, and select Add Custom Action (see Figure 18-42).

Figure 18-42
Select Application Folder, select the RSSReaderInstall.dll
file (see Figure 18-43), and click OK.

Figure 18-43
The Custom Actions tab should now look like Figure 18-44.

Figure 18-44
Set the various properties of the RSSReaderSetup
project as shown in the following table (see Figure 18-45).
Property | Value |
---|---|
Author | Wei-Meng Lee |
Manufacturer | Developer Learning Solutions |
ProductName | RSSReader |

Figure 18-45
The last step is to build the project. Right-click on the RSSReaderSetup
project in Solution Explorer, and select Build.
The MSI installer is now in the Release
subfolder of the folder containing the RSSReaderSetup
project (see Figure 18-46).

Figure 18-46
To test the MSI installer, ensure that your emulator (or real device) is connected to ActiveSync. Double click the RSSReaderSetup.msi
application, and the installation process begins (see Figure 18- 47).

Figure 18-47
Follow the instructions on the dialog. At the end, an Application Downloading Complete message displays (see Figure 18-48).

Figure 18-48
Check your emulator (or real device) to verify that the application is successfully installed (see Figure 18- 49).

Figure 18-49
To uninstall the application, double-click the RSSReaderSetup.msi
application again. This time, you see the dialog shown in Figure 18-50.

Figure 18-50
If you choose to remove the application, the Windows CE Application Manager displays the list of programs that you have installed through ActiveSync (see Figure 18-51). To uninstall the RSS Reader application, uncheck the application and click OK. The application is removed.

Figure 18-51
One problem you will likely face when deploying your application to real devices is that the target device does not have the required version of the .NET Compact Framework (version 3.5 is needed). Hence, you need to ensure that the user has a means to install the right version of the .NET Compact Framework. There are two ways of doing this:
□ Distribute a copy of the .NET Compact Framework 3.5 Redistributable to your client. You can download a copy from http://microsoft.com/downloads. Users can install the .NET Compact Framework before or after installing your application. This is the easiest approach, but requires the user to perform the extra step of installing the .NET Compact Framework.
□ Programmatically install the .NET Compact Framework during installation, using the custom installer. Earlier, you saw how you can invoke the Windows CE Application Manager from within the custom installer class by using the .ini
file. In this case, you simply need to create another .ini file, this time to install the CAB file containing the .NET Compact Framework. The various CAB files for the .NET Compact Framework 3.5 can be found on your local drive in the following directory: C:Program FilesMicrosoft.NET SDKCompactFrameworkv3.5WindowsCE
. Figure 18-52 shows the various CAB files for each processor type (ARM, MIPS, SH4, X86, and so on). To install the .NET Compact Framework 3.5 on Windows Mobile 6 Standard devices, you just need to add the NETCFv35.wm.armv4i.cab
file to the RSSReaderInstaller
project, together with its associated .ini
file.

Figure 18-52
Summary
This chapter explored developing applications for the Windows Mobile 6 platform, using the .NET Compact Framework. Using that framework, you can leverage your familiarity with the .NET Framework to develop compelling mobile applications. The RSS application is an example of a useful application that you can use on a daily