File Element (Upgrade)

This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This page may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.

Describes the relationship between an existing provisioned file to its equivalent for upgrading to a new version of Windows SharePoint Services, specifying how setup paths of files in the previous version map to setup paths in the new version relative to the \60\Template and \12\Template directories respectively.

<File
    FromPath = "String"
  ToPath = "String">
</File>

Attributes

Attribute

Description

FromPath

Required String. Specifies the setup path of the file to be upgraded relative to the \Program Files\Common Files\Microsoft Shared\web server extensions\60\TEMPLATE directory. Use the token {LocaleId} to specify a locale identifier as part of the path. Example:

FromPath="{LocaleId}\STS\Lists\announce\EditForm.aspx"

ToPath

Required String. Specifies the location in the setup directory of the file to which the file of the old version is mapped relative to the \Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE directory. Example:

ToPath= "Features\AnnouncementsList\announce\EditForm.aspx"

Child Elements

None

Parent Elements

Files

Occurrences

Minimum: 0

Maximum: Unbounded

Remarks

File upgrades can be applied to any sort of uncustomized file, usually .aspx pages, but also entities such as document templates. In the upgrade definition it is best to list all previously installed uncustomized (also known as "ghosted") files, including ones that were provisioned as part of a list, or files only located in the top-level Web site, such as .dwp files for Web Parts.

Windows SharePoint Services supports a {LocaleId} token, which specifies to use a locale identifier as part of the path. This makes it possible to map locale-specific files.

Example

For an example of how this element is used, see Upgrade Definition Schema.

Microsoft.Win32.RegistryKey#4