views:

130

answers:

4

We just ran into a problem where everything was compiling correctly, but not being deployed to the mobile device during debugging. Of course this caused weird errors that were hard to track down. The solution was simple, just delete the directories on the mobile device. Is there a way to ensure/force the files to be deployed every time? A VS setting? Is it version ing on our assembly not changing?

+1  A: 

Go into the Configuration Manager and you'll see that there are a series of check boxes for "Build" and "Deploy" for each project in the solution. Check "Deploy" for all that you want to ensure get deployed.

ctacke
A: 

In my experience, ActiveSync is not very consistent.
Also, if the application deploys correctly if you first remove it from the device, it is probably not a configuration problem either. At least with VS2005 there are no magic knobs to twist in this regard. Does the deployment go very quickly, or does it look like it is actually deploying?
My suggestion would be to try ActiveSync over Bluetooth. IMHO it is more stable than over USB. (Unless, ofcourse, you are running on the emulator...)

E Dominique
I am running the emulator. It seems to happen when VS crashes or the app crashes.
nportelli
+2  A: 

Using VS2005 and unmanaged code (C++), I notice that VS will not deploy a new binary if there is already one on the device with a higher version number. If it is the same or lower, then everything is fine.

Aye, this one catches me out at work all the time when i'm working with old release branches.
Quibblesome
+1  A: 

In power toys for Windows Mobile developers, there is a utility called CECopy. This allows you to copy files from your PC to the mobile device. If everything else fails, use this in Pre-Build events to copy the required files. If the copy fails, you will at least get a notification.

kgiannakakis