Deploying your applications to the Windows platform

There are a number of options for distributing your Windows-based mobile application. This topic covers three distribution methods (xcopy, ClickOnce, and Windows Installer), providing an overview for mobile applications deployment. For more in depth information on these deployment methods, see the MSDN topic Deploying .NET Framework applications.

Xcopy

The xcopy deployment method involves copying the application executable, the software development kit (SDK) libraries, and any other dependant files to a target directory on the target Windows-based machine. The application is then run from the target directory. You must ensure that the .NET 3.5 SP1 Framework is installed on the target machine. While this is the simplest method of deployment, it requires a lot of user interaction, which makes other options more efficient.

The other deployment methods are, in reality, smarter and more user friendly versions of the xcopy deployment and are recommended for enterprise environments where you have to deploy to a large number of machines.

ClickOnce

ClickOnce is a new deployment technology provided with the .NET Framework. It offers many advantages over the traditional Windows Installer including a choice of deploying mechanisms (web, file, or media based), incremental updates, and greater security. Visual Studio provides full support for publishing and updating applications deployed with ClickOnce. As with Windows Installer, ClickOnce creates a setup executable that the user runs via a web page or shared storage location.

There are two requirements when creating Windows-based Mobile SDK applications with ClickOnce. First, the applications must be granted full trust permissions. Second, the ClickOnce manifest must be signed with an appropriate certificate. During development, a temporary certificate is generated and assigned. However, for release applications, obtain an appropriate certificate. The MSDN help topic referenced above contains more details on these requirements.

The following steps show how to set up and publish a Windows-based mobile application to a shared location via ClickOnce:

  1. Open your Windows-based mobile project in Visual Studio.
  2. Display the project properties for your application.
  3. On the Security Tab, check Enable ClickOnce Security Settings and set to This is a full trust application.
  4. Click the Publish Tab.
  5. Type a Publishing Folder Location file path. If you want other users to install from this location, make it a shared path with appropriate permissions.
  6. For Install Mode and Settings, select The Application is available offline as well.
  7. Click Application Files and verify the required files are included.
  8. Click Prerequisites. Check all applicable prerequisite packages for your application. You can include a check for the .NET Framework.
  9. Click Options. Type a Publisher name and Product name. These are used to create the program name under the Start menu when installed.
  10. Click Publish Now to publish the application to the disk path.
  11. Navigate to the published disk path and run the setup.exe file located there. This will install the application on your machine. You can run the application via the Windows Start > Programs menu item.

  12. Uninstall the application via Windows Add/Remove Programs when appropriate.

Windows Installer

Windows Installer allows you to create a deployment package consisting of a setup executable and supporting files. These are distributed to the user who then runs the executable and installs the application via the install wizard. The deployment package is created from a setup project within Visual Studio.

Windows Installer has no prerequisites other than those mentioned in the title page. You include the executable, the SDK libraries, and any supporting files in your setup package.

The following steps show how to create a deployment package for a Windows-based mobile application using Windows Installer:

  1. Open your Windows-based mobile project in Visual Studio.
  2. Right-click your solution in Solution Explorer, click Add, then click New Project.
  3. In the Add New Project dialog box, in the Project Types pane, open the Other Project Types node, click Setup and Deployment Projects, then click Setup Wizard in the Templates pane.
  4. Click OK to close the dialog box. The Setup Wizard dialog box appears.
  5. Click Next after you read the introduction screen.
  6. On the Choose a project type panel, select Create a setup for a Windows application and click Next.
  7. On the Choose project outputs to include panel, check Primary output from, and click Next.
  8. On the Choose files to include panel, click Add, then navigate to the bin output directory for your compiled application. Select the native Windows mobile libraries (ESRI.ArcGIS.*.dll and other DLLs), and click Open. The files are added to the panel.
  9. Click Next.
  10. Review the Create Project panel, and click Finish. The setup project is added to your solution.
  11. Examine the properties for the setup project. The Manufacturer and ProductName properties determine the program files menu and submenu items when the application is installed. Change these to meet your requirements.
  12. Click Build > Build Solution to build the solution.

The deployment package can be found under the setup project's output directory and usually consists of setup.exe and setup.msi files. To install the application on this computer, run the setup.exe file. These files can be deployed to other computers via shared directories or media.

1/7/2015