VS2005 on Vista Ultimate 64-bit, Could not deploy to WM5.0 Device - Solution!


Neville Lang

Hi all,

I just spent most of the day trying to sort out a problem I had with failing
to deploy a CF app on VS2005 to my WM5.0 device.

As background, I have VS2005 SP1 on a Vista 64 computer. I have two devices,
a WM2003 Pocket PC and a WM5.0 Pocket PC used for testing. I do not use the

I recently debugged a MSI installer / uninstaller issue I had on my WM2003
device and after that was completed then moved on to another issue in the
main app unrelated to MSI installer / uninstaller. I chose to unplug my
WM2003 Pocket PC from the USB port and then plugged in my WM5.0 Pocket PC. I
then made a change to the code, setup a breakpoint and then pressed F5 to
Debug. As it was deploying, I suddenly realised the Target Device set for my
Project was still on "Pocket PC 2003 Device" from the previous issue. I then
aborted the deployment.

Once I changed over the Target Device to Windows Mobile 5.0 Pocket PC
Device, I then tried to Debug my program (F5) on that device. However, I for
quite a long time I kept getting one of the following two Deployment error

"An operation was attempted on something that is not a socket."
"The network connection was gracefully closed."

Scanning the internet and the Microsoft did not shed any light on my problem
with either of these two error messages.

For many hours, I tried all different things in settings etc. to overcome
these error messages including deleting and re-establishing the device
Partnership. The thing that I found finally worked for me was to do a hard
reset on my WM5.0 Pocket PC device. As soon as I did that the Deployment and
Debug of my app worked fine.

I can only think that originally deploying using the WM2003 Target somehow
screwed things up on the WM5.0 device. Anyway, a hard reset of the device
did the trick.

I just thought I would present my finding here in the CF group in case
anyone else comes across this problem running two devices.

Neville Lang



Neville Lang

Hi all,

I may have been a little hasty in posting my previous solution.

Although I was able to get the Deployment working after the hard reset, my
normal method of doing things is to install a full Release version of my app
using my MSI thus setting up the file structure on the device. I then ensure
that the app is working by starting it up on the device.

Under VS .NET 2003, when my project has been switched back to Debug mode I
then just downloaded the main project's EXE onto the device and begin
debugging the latest change. I could not do that on my current development

After I forwarded my previous post on this topic, I then manually deleted
the folder created on the device after the test Debug download after the
hard reset, and then installed the full Release version of my app onto my
WM5.0 device. I then started up VS2005, ensured I was in Debug mode then
pressed F5. Surprisingly, I again got those two deployment error messages
again (mentioned in my earlier post) at different times when I pressed F5
for Debug.

Apparently with the combination I have - VS2005 SP1, Vista Ultimate 64-bit
and a WM5.0 device - it seems that the Deploy will not overwrite the Release
version of the project's EXE on the WM5.0 device. Instead of saying that it
cannot overwrite the EXE, it gives one of those two deployment error
messages. To fix my situation, I found that I had to first manually delete
the my app's EXE that was installed on the device during the full
installation (the Release version) and then pressing F5 in VS2005 then
allowed the Debug version EXE to be downloaded onto the device, ready for

I can now move on...

Neville Lang

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question