views:

681

answers:

2

With WSSv2 (SharePoint 2003) you could get the version of SharePoint you were working with

e.g. SPGloablAdmin.Version gives you "12.0.0.6219" for WSSv3 SP1

However its now obsolete (although still works).

Does anyone know the WSSv3 (SharePoint 2007) equivalent?

You have things like SPWebService.ContentService.Version but that version number is just a timestamp and doesn't seem to relate back to build versions.

+2  A: 

SPWebService.ContentService.Farm.BuildVersion

http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.administration.spfarm.buildversion.aspx

Ryan
+4  A: 

SPFarm.Local.BuildVersion would probably give you the same result without having to refer to a SPWebService.

Cheers :)

Maxim