0

I need to deploy the custom files like (CSS,js,images) into Style Library folder in SharePoint 2013 by using Visual Studio.

I created a module and edited the element.xml as

<?xml version="1.0" encoding="utf-8"?>
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
  <Module Name="Style Library" Url="Style Library">
    <File Path="Style Library\Sample.txt" Url="Style Library/Sample.txt" />
  </Module>
</Elements> 

This is not working.

  • Can you please add more details, what is happening when you activate feature ? Does it activates successfully but files are not getting deployed or you are getting any error ? – Siddharth Vaghasia Nov 10 '16 at 12:50
3

Try this:

          <?xml version="1.0" encoding="utf-8"?>
          <Elements xmlns="http://schemas.microsoft.com/sharepoint/">
            <Module Name="Style Library" Url="Style Library">
              <File Path="Style Library\Sample.txt" Url="Sample.txt" Type="GhostableInLibrary"/>
            </Module>
          </Elements> 

I think the path of URL needs to be without the path of the module. I am missing also the type.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.