SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a custom list definition and a custom list instance in a feature.

If I want to populate some data in the list at its creation, I can use the data node.

How can I add an attachment to this item ?

I've tried to use a module

<Module Name="CustAttachment" Url="Lists/MyList/Attachments/1">
    <File Path="MyFile.doc" Url="MyFile.doc" Type="GhostableInLibrary" />

But it does not works. It says "cannot create folder Lists/MyList/Attachments".

I know I can do this in code, but is there a xml-way of attaching a file in a custom list instance ?


share|improve this question

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.