Jaa


ProjectItemFile element

Applies to: yesVisual Studio noVisual Studio for Mac

Note

This article applies to Visual Studio 2017. If you're looking for the latest Visual Studio documentation, see Visual Studio documentation. We recommend upgrading to the latest version of Visual Studio. Download it here

Represents a SharePoint file, such as Feature element file, to include with the project item when it is deployed to SharePoint.

Syntax

<ProjectItemFile Source = "Name of the file"
    Target = "Deployment path of the file"
    Type = "Type of deployment for the file" />

Type

ProjectItemFileType

Attributes and elements

The following sections describe attributes, child elements, and parent elements.

Attributes

Attribute Description
Source Required xs:string attribute.

The name of the file to deploy with the project item.
Target Optional xs:string attribute.

The path where the file will be deployed on SharePoint, relative to the deployment root folder. The deployment root folder is determined by the deployment type specified by the Type attribute. If the Target attribute is not specified, the file will be deployed to a folder with the name specified in the Source attribute.

For more information, see the descriptions for the Deployment Path and Deployment Root properties of SharePoint project items in Develop SharePoint solutions.
Type Required xs:string attribute.

The type of deployment for the file. For more information about the possible values, see the description for the Deployment Type property of SharePoint project items in Develop SharePoint solutions.

Child elements

None.

Parent elements

Element Description
Files Specifies the files to include with the SharePoint project item when it is deployed to SharePoint.

Remarks

SharePoint files that are typically referenced in ProjectItemFile elements include Feature element files (Elements.xml), schema files for list definitions (Schema.xml), and Web Part definition files for Web Parts (.webpart).

Element information

Property Value
Namespace http://schemas.microsoft.com/VisualStudio/
2010/SharePointTools/SharePointProjectItemModel
Schema name SharePoint Project Item Schema
Validation file ProjectItemModelSchema.xsd
Can be empty No

See also