
Deploying the Application
Assuming the application is complete, you are now ready to deploy it. For this walkthrough, you will use ClickOnce deployment.
Creating a ClickOnce deployment for an application that has a SQL Server Compact Edition database consists of configuring the appropriate publish information in the Project Designer.
Note |
|---|
| Adding a SQL Server Compact Edition database file to a project automatically configures the appropriate publish information for ClickOnce deployment. However, in this walkthrough you will inspect and verify each setting to understand how deployment works. |
To configure ClickOnce deployment for an application that has a SQL Server Compact Edition database
-
To open the Project Designer, in Solution Explorer, double-click My Project if you are working on a Visual Basic project (or Properties if you are working on a C# project).
-
Click the Publish tab.
-
Click Application Files and then set the Publish Status of Northwind.sdf file to Data File (Auto).
This setting notifies the installer to put this file in the Data Directory.
-
Click Prerequisites and then select the check box for SQL Server Compact Edition.
This setting notifies the installer to check whether the SQL Server Compact Edition runtime exists, and to install it from the Internet if it is not found.
Creating the Installer
Now that the publish information is configured to deploy the SQL Server Compact Edition database together with the application, it is time to create the installer.
To create the installer
-
In the Publishing Location area, click the ellipsis button (...) to open the Open Web Site dialog box.
-
Select File System.
-
Create a new folder to deploy the installer to, and then select it.
Note |
|---|
| You can create the folder anywhere. Just remember where it is so that you can locate it later. |
-
Click Open.
-
Click Publish Now to create the installer.