Site Versioning and Setup Path Fallback

Applies to: SharePoint Foundation 2010

A key feature of upgrading is to know the current state of a site, which is provided through site versioning. To facilitate site query and performance, Microsoft SharePoint Foundation 2010 stores the version number as two integers in the database: a product version and a template version.

SharePoint Foundation 2010 assigns legacy sites a product version of 3 and a minor version of 0.

Product Version

A product version is a single integer that represents the last version to which a site was created or upgraded. SharePoint Foundation 2010 supports only two product versions for upgrade: 3 specifies that the site was upgraded from a site created in the previous version, while 4 specifies that the site was created through the new version.

The setup path for a site is keyed off the product version. If the product version is 3, SharePoint Foundation uses the \web server extensions\12 path. If the product version is 4, it uses the \web server extensions\14 path.

Template Version

In addition to a product version, SharePoint Foundation maintains a template version for the site. The template version is an arbitrary incremental integer that SharePoint Foundation tracks. This number can be incremented by developers any time they make a significant change to a site definition to require using an upgrade template. The template version is determined by the owner of the site definition.

The latest known version of template version for a site definition is stored in a site definition file. SharePoint Foundation provides powerful facilities to update a site template over time, which makes it tempting to use an upgrade as a way to deploy new abilities to a site. However, if you invent your own template version and modify how a site functions, it will make future upgrade of the site by the original creator of the site version impossible.

The only way to increment the product version and/or template version for an existing Web site is to create a site upgrade definition. In other words, you can have an STS site definition with a ProductVersion attribute that specifies 4 and a SchemaVersion attribute that specifies 150, and yet have functioning Web sites that use the STS site definition where ProductVersion equals 3 and SchemaVersion equals 100. The STS definition may not have been upgraded because an upgrade definition does not exist, or because the Web site has not been upgraded yet.

In a build-to-build upgrade, the product version remains the same, but the template version is incremented between builds.

Setup Path Fallback

SharePoint Foundation 2010 implements a content access and rendering fallback mechanism for a setup path. SharePoint Foundation calculates the setup path of a file specifically as a feature, searching first for the current version's uncustomized file in the 14 directory, and if it exists, SharePoint Foundation renders the page. However, if the file does not exist in the 14 directory, SharePoint Foundation searches the 12 directory for the file. If in turn SharePoint Foundation doesn’t find the file in the 12 directory, it searches the 60 version of the directory.

See Also

Concepts

Best Practices for Using Feature Versions

Other Resources

Upgrading SharePoint Foundation