My family has been out of town and they are about to come back home so I have had a lot of people asking me how long. I can figure out the days but when I started getting ribbed about having to figure it out in hours or minutes I decided to do something about it. I wrote my first "real" .NET Compact Framework application. By "real" I mean one that I actually deployed to a Pocket PC and not just the emulator. Coding the application turned out to be rather simple. It has a label, a text box, and a button. I ask the user to input a date and then when they click the start button I enable a timer that fires an event once a second. On the event I calculate a TimeSpan of the difference between the date entered by the user and the current date on the device. I then use the DrawString method from the Graphics object to write out the time in a NASA type countdown with days, hours, minutes, and seconds. On other lines I output the totla number of days, hours, minutes, and seconds left until the date. It took me just over an hour to code it. Most of the problems came from the fact that even though intellisense says there are methods on controls they don't do anything other than throw a NotImplementedException. I seem to remember some guest on .NET Rocks! saying that the .NET Compact Framework was just a wrapper around NotImplementedException but at the time it didn't mean anything to me, now I understand a little more what they were talking about.
The real problem came when I tried to deploy to the Pocket PC. I got an error saying that communication to the device could not be made. I looked on the Microsoft Knowledge Base and found article 813579 that explained that if you do not install ActiveSync before installing Visual Studio the necessary registry entries will not be there. The article also offered two possible solutions. I could either find the registry values from a different machine or I could uninstall and re-install Visual Studio. I didn't have another machine with Active Synch and VS .NET 2003 installed so I opted for the uninstall and re-install. After spending a couple of hours at the process (I was away from the computer eanting dinner for part of the time so it took longer than needed) I still could not deploy. I got the same exact error. I thought it might be because I was running as a least priviledged user so I opened a new copy of VS .NET as the local administrator. I still coudn't deploy. Finally I ran MakeMeAdmin to open a command prompt as my user with administrative priviledges and ran VS .NET from there. I still couldn't deploy. I was about ready to go back to searching the web to find out if anyone else had found and fixed the problem when I decided to remove the Pocket PC from its cradle and reseat it. When I did that I was able to deploy without any problems. I am not sure what it was about removing and reseating the device that suddenly made VS .NET want to play nice but now I am wondering if I could have skipped the whole uninstall and re-install step. I guess the world will never know.
P.S. Just in case you are curious I am now down to under 238,000 seconds until my family gets home.
Powered by: newtelligence dasBlog 2.1.8102.813
Disclaimer The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.
© Copyright 2010, Scott Golightly
E-mail