Microsoft KB Archive/945316

From BetaArchive Wiki
Knowledge Base


A smart device application cannot be started on an emulator or on a mobile device if you develop the application on a computer that has Visual Studio 2008 and Visual Studio 2005 installed

Article ID: 945316

Article Last Modified on 11/27/2007



APPLIES TO

  • Microsoft Visual Studio 2008 Team Suite
  • Microsoft Visual Studio 2008 Team Edition for Database Professionals
  • Microsoft Visual Studio 2008 Team Edition for Software Architects
  • Microsoft Visual Studio 2008 Team Edition for Software Developers
  • Microsoft Visual Studio 2008 Team Edition for Software Testers
  • Microsoft Visual Studio 2008 Standard Edition



SYMPTOMS

You develop a smart device application on a computer that has Microsoft Visual Studio 2008 and Microsoft Visual Studio 2005 installed. If you deploy the smart device application to an emulator or to a mobile device, the application cannot be started on the emulator or on the mobile device. This problem occurs if the application is based on the Microsoft .NET Compact Framework 3.5 and on the SQL Client for mobile devices (System.Data.SqlClient.dll).

This problem does not occur if the application is based on the Microsoft .NET Compact Framework 2.0 and on the SQL Client for mobile devices.

CAUSE

This problem occurs because the SQL Client for mobile devices is not deployed to the emulator or to the mobile device.

WORKAROUND

To work around this problem, manually deploy the SQL Client to the emulator or to the mobile device. To manually deploy the SQL Client, use the following .cab files:

  • Sql.dev.language.device.platform.processor.cab
  • Sql.device.platform.processor.cab

Note Each placeholder in the file names represents one of the following values.

Placeholder Values
language CHS, CHT, DE, ENU, ES, FR, IT, JA, KO, RU
device ppc, phone, none
platform wce4, wce5
processor armv4, armv4i, mipsii, mipsii_fp, mipsiv, mipsiv_fp, sh4, x86

You can find these .cab files in the following folder:

%Program Files%\Microsoft SQL Server Compact Edition\v3.5\Devices\Client\platform\processor


Note The .cab files and .dll files in the following folder are also used to install the SQL Client for mobile devices on Windows CE 6.0 devices and to install the SQL Client for Windows Mobile 6.0 devices:

%Program Files%\Microsoft SQL Server Compact Edition\v3.5\Devices\wce500


To deploy the System.Data.SqlClient.dll file by using Visual Studio 2008, copy the files and folder for the SQL Client for mobile devices as follows.

Original folder Folder to which files and folder are copied
%Program Files%\Microsoft SQL Server Compact Edition\v3.5\Devices\Client %Program Files%\Microsoft Visual Studio 8\SmartDevices\SDK\SQL Server\Client\v2.0


MORE INFORMATION

Steps to reproduce the problem

  1. On a computer that has Visual Studio 2005 installed, install Visual Studio 2008. During the installation, make sure that the Smart Device Programmability option under Visual C# or under Visual Basic is selected.
  2. Create a .NET Compact Framework 3.5-based smart device application.
  3. Add a reference for the SQL Client for mobile devices (System.Data.SqlClient.dll).
  4. Build the application, and then deploy the application to an emulator or to a mobile device.

Notice that the application cannot be started on the emulator or on the mobile device.

Keywords: kbtshoot kbexpertiseadvanced kbprb KB945316