Versioning Your Silverlight Application

When writing an enterprise level application it’s critical to have a version number.  Whether it’s located on the help screen or in debug mode, this will save you so much heartache during QA.  The larger the project, the more dependent your team is on the version.

Now that I’m all done ranting to the converted, let’s talk about Silverlight.  From my past experience there are two ways to handle versioning:

  1. Create an abstracted file that contains your version number, or
  2. Use the Assembly version.

Both have their pros and cons.  Option 1 gives you greater control of the version number, however the manual process is tedious.  Option 2 enables you to use the Assemblies version, however it provides less control over the version number.  Lately I’ve been going with option 2 because it takes one more step out of my deployment process.

To get the version from the Assembly

Doing this is fairly easy once you have the correct block of code.  The below block of code shows how to get the version from the Assembly in the MainPage_Loaded method.  Do not forget to include the System.Reflection reference.

image

Given the above block of code, the next question is, where is this assembly version defined?  In short, the AssemblyInfo.cs file, which is located in the Properties folder.

 

 

At the bottom of the AssemblyInfo.cs file, you’ll see the version info.  The directions are in the comments on how to change this.  I’ve customized my version to be 0.611.*.

 

References
0

Over the past year Corey was a lead developer on the NBCOlympics.com Silverlight 2 video player, he is currently finishing up a book with PeachPit Press - Microsoft Expression Blend a Visual Quickstart Guide (ISBN 0-321-41223-0), and he maintains a Silverlight blog “Silverlight made Simple”. Other Silverilght project he has worked on are HSN.tv with Silverlight 1.0 and the Blockbuster Stream application using Silverlight 2. Corey is a DZone MVB and is not an employee of DZone and has posted 9 posts at DZone.

(Note: Opinions expressed in this article and its replies are the opinions of their respective authors and not those of DZone, Inc.)

Comments

bet replied on Mon, 2009/06/29 - 2:29pm

Lets start from beginning. I have started earn $$ with sports betting about 3 years ago. Firstly I was very very bed thinking about this kind of job. Lots of people said me that sports btting is just gambling and nothing more. That I have started read a lot of betting and bookmakers firms, bonuses ect. First what I found what very interested me was betfair and Betfair trading system it is nothing but exchange bets with other members of this system. It is amazing option earn lots of money. One more think what I love in betfair is great bonus with Sports betting. Firstly when You wanna start betting You have to choose of the betting system and next find good site with livescore. When You have more information about sport betting You could think about change Your bookmaker to something new like bwin or bet365. Last think what I wanna tell You is Good LUCK, read and learn as much as You can and finaly You got You succes with bookies.Best regards !!

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.