How To: Develop C++ or C# application with Visual Studio 2008
For developing applications, you can use Visual Studio 2008 instead of Visual Studio 2005 Service Pack 1.
Depending on the version of the operation system on the HiCO.xxx device you have to consider some issues which are described below.
There are no known considerations for devices with Windows CE 5.0 as operating system. You can develop and debug applications as you
can do with Visual Studio 2005.
If you want to develop and debug applications for device you have to consider some aspects during installation of the corresponding Software
Development Kit and attempt to connect to the device.
If you have not installed also the Visual Studio 2005 on the same Workstation as the Visual Studio 2008, you must choose the custom
installation and deselect the option “Documentation”. Otherwise you will get an installation error like this:
ToolsMsmCA(Error): IHxFilters filter registration failure Err=0x80040305, Context = pFilters->SetNamespace(Namespace)
There are two options to connect for deploying and debugging:
- Connecting with automatic configuration using ActiveSync
- Manual connection to a device with a known IP address
There are no considerations using this method. Visual Studio 2008 detects the Windows CE device and deploys all necessary files to the
Windows CE device through the ActiveSync connection. After the deployment of the required files, Visual Studio 2008 will automatically
create a network connection and use this connection for deployment and debugging of the application under development.
When you cannot use or if you don't want to use a ActiveSync connection to make the initial deployment of the required communication
files, you have to execute the steps listed below. In particular very important is that you use the communication files which comes with
Visual Studio 2008.
- You have to copy the files which are stored on your development workstation in the folder \Program Files\Common Files\Microsoft Shared\CoreCon\1.0\Target\wce400\. This folder is available after the installation of Visual Studio 2008. You should copy these files to a new folder on the Windows CE device only containing these files.
- Open a command line (cmd.exe) on the Windows CE device and go to the directory created in the step before using cd-commands.
- In the command line which were open in the step 2 you should execute the following commands consecutively:
- start conmanclient2
- start cmaccept
- Now you can make the connection using the corresponding menu item in Visual Studio 2008. A description is found in this Microsoft document. This document is written for Visual Studio 2005, but the steps in the section “Prepare Visual Studio for connecting” are the same in Visual Studio 2008.
Technical background why copying the files to a new folder:
Using the described way guarantees that the new version of the device-side files are used and not the files which are included in the kernel image (caused by the behavior how the OS searches for files to load). The included files comes with Visual Studio 2005 resp. Windows CE Platform Builder. Visual Studio 2005 is the development environment which are recommended by Microsoft(R) for Windows CE development. A newer version of this development environment is Visual Studio 2008, which comes with a newer version of the required files. If you use the older files, Visual Studio 2008 complains that the device-side files are not up-to-date and refuses the connection.
- coexistent installation of Visual Studio 2005 and Visual Studio 2008
This is possible when Visual Studio 2008 is installed after Visual Studio 2005 without any known issues. If you reverse this installation order you get trouble when you developing applications for smart devices.
- Application debugging with Visual Studio 2005 when Visual Studio 2008 is also installed on the development machine
In this case you have to consider the same points as you are using Visual Studio 2008 because with the installation of Visual Studio 2008 the host-side files are exchanged with a newer version (the files are in the same location on the development machine).
- How can I identify the version of the files used for the connection?
You can identify the file version on the development machine when you are using the Windows Explorer. Open this application, browse to the location of the files (\Program Files\Common Files\Microsoft Shared\CoreCon\1.0\Target\wce400\) and select one of the executable files. Then press the right mouse button and select in the context menu the item “Properties”. There is a tab named “Version”. On this tab you see the file version. Starts the file version with 8.0.* the files comes from the Visual Studio 2005 installation. When the file version starts with 9.0.* than the files comes from the Visual Studio 2008 installation.