« Bloglines | Main| Open Audit - Attachments »

Building Windows Mobile application with Visual Studio

Bookmark : del.icio.us  Technorati  Digg This  Add To Furl  Add To YahooMyWeb  Add To Reddit  Add To NewsVine 


I am still working on this Windows Mobile application.  I am in the polishing stage now.  It has been a challenaging project becuase of having to learn about SQLCE, Windows Mobile, wireless printing (which Windows Mobile does not support natively).  One of my biggest frustrations was the Visual Studio build was getting longer and longer.  It seemed the more I added the slower it got, but shutting down Visual Studio also helped.  I could not find anything anywhere that described this problem or anyone else that had the same problem.  Until yesterday I found VS2008 Windows Mobile 5 Project very slow to compile on a MSDN form.  Yes, I have tried 2005 & 2008 version and they both act the same.  The builds where taking 30 minutes.

It got to the point that I started developing this application as a Windows application and the builds would take only a couple of minutes.  This was fine until I got to the point of really testing the application using a mobile device, so I had to convert the project back.  Believe me the 30 minute build only last a couple of days until I found a new way to build my project.  It is not so new but different, because I am using MSBuild to do my compiling and taking only 2 minutes to compile.  After the build I still use F5 to build the project and run, but now there is nothing to build so VS starts the deploy and I am a happy man!!!  There is one BIG downfall to this approach, forgetting to use MSBuild to do the compiling and pressing F5.  It does allow me to write this article though!!!!

Here is my solution to slow builds in VS:
0. Open a VS 2008 command prompt (this is not a normal command prompt, it is a short cut by the VS short cut in the Start | Program | .. menu) ( this only needs to be done once)
1. Save all changes (Ctrl-Shift-S)
2. At the command prompt type MSBuild <path\filename of your VS project> (drag the file from Explorer) & press enter
3. Wait for build to complete
4. Run (F5) your VS project

Hope that saves a few hairs.

Comments

1 - I had the same problem and it was driving me wild, but found this article:

Platform Verification Task

{ Link }

Now back down to 30s build and deploy times.



2 - Perfect. Thanks for the link it, worked.

Post A Comment

:-D:-o:-p:-x:-(:-):-\:angry::cool::cry::emb::grin::huh::laugh::lips::rolleyes:;-)