Deploy file to Sharepoint using Module

21/07/2015 16:11

This code deploys FileName.xsl to Style library/MySubfolder folder

Add New item/Module in Visual studio

Give it the name, rename sample.txt to FileName.xsl

Update Elements.xml file according to code below


<?xml version="1.0" encoding="utf-8"?>
<Elements xmlns="https://schemas.microsoft.com/sharepoint/">
  <Module  Url="Style Library/MySubfolder">
  <File Path="FolderInVSSolution\FileName.xsl" Url="FileName.xsl" Type="GhostableInLibrary"/>
</Module>
</Elements>