Mobile Line Of Business

Richard Jones (MVP)

  Home  |   Contact  |   Syndication    |   Login
  202 Posts | 0 Stories | 36 Comments | 0 Trackbacks


Welcome to the Mobile Line Of Business Blog

Tag Cloud

Article Categories


Post Categories

Image Galleries


While working with a test team, today,  we were doing incremental builds of a Compact Framework application.



We wanted to display the build time of each release of software,  so that the test team could be sure we were all using the current version.

This tiny bit of code achieves just that.

 public static DateTime BuildTime()
            Assembly assembly = Assembly.GetExecutingAssembly();
            string filename = System.Reflection.Assembly.GetCallingAssembly().GetName().CodeBase;
            FileInfo info = new FileInfo(filename);
            return info.CreationTime;


posted on Tuesday, May 26, 2009 11:21 AM


# re: Build Time 5/27/2009 8:35 AM Andrew Butler
Not to be picky but is the first line necessary? You don't seem to use the executing assembly?

Keep up the good work with the blog!

# re: Build Time 5/27/2009 11:26 AM Richard
Gosh your right.. Even more minimal!

Thanks Andrew

# re: Build Time 6/23/2009 6:58 AM Robin
Just tried this out. Deploying via cab file. Seems to work on Motorola MC70 (WM5) but MC75 (WM6.1) seems to reset Creation time to the time it was deployed?

Post A Comment