Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4557214
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T17:28:39+00:00 2026-05-21T17:28:39+00:00

I am making a feature in sharepoint 2010 foundation and the procedure is below:

  • 0

I am making a feature in sharepoint 2010 foundation and the procedure is below:

1- I created a empty c# project in visual studio and made 3 files in their (feature.xml, elements.xml and sample.txt) (it has been made to copy the sample.txt file to “Shared Documents library”

2- I copied the three files in the 14 Hive features folder in my new folder named “demofeature”

3- I ran command to install the feature which is (stsadm -o installfeature -name demofeature) it ran successfully

4- I am now able to see my feature in (site settings > manage features page) the site/web and I activated it from there

5- I went to shared documents but I cannot see my file there i.e: sample.txt and also I didnt see any errors during the deployment.

Please let me know, what can be wrong here?

I am pasting my code below :

feature.xml

    <?xml version="1.0" encoding="utf-8" ?>
<Feature xmlns="http://schemas.microsoft.com/sharepoint/"
         Id="2BAC8ED9-3CFF-4922-9E4F-81F8AD9500F9"
         Scope="Web"
         Title="RHM test feature" >

  <ElementManifests>
    <ElementFile Location="elements.xml"/>
    <ElementFile Location="Sample.txt"/>
  </ElementManifests>
</Feature>

elements.xml

<?xml version="1.0" encoding="utf-8" ?>
<Elements xmlns="http://schemas.microsoft.com/sharepoint/" >

  <Module Name="Deploy" Url="Shared Documents" Path="Shared Documents" >
    <File Url="Sample.txt" Type="GhostableInLibrary" Path="Sample.txt">
          </File>    
  </Module>
</Elements>

and a sample.txt file which is placed in the new feature folder.

Thanks
Raj

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-21T17:28:39+00:00Added an answer on May 21, 2026 at 5:28 pm

    I would highly suggest using Visual Studio 2010 for creating your features and modules. Otherwise, it is only a high priced text editor. From the menu, select Project > Add New Item, then select Module from the SharePoint 2010 templates. This would generate all of the XML for you correctly.

    To your question, try the following XML:

    <?xml version="1.0" encoding="utf-8" ?>
    <Feature xmlns="http://schemas.microsoft.com/sharepoint/"
             Id="2BAC8ED9-3CFF-4922-9E4F-81F8AD9500F9"
             Scope="Web"
             Title="RHM test feature" >
      <ElementManifests>
        <ElementManifest Location="elements.xml"/>
        <ElementFile Location="Sample.txt"/>
      </ElementManifests>
    </Feature>
    

    The elements.xml file must be in an ElementManifest element, not an ElementFile element.

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

    Having a Path attribute in the Module element means that SharePoint will search a Shared Documents folder within your feature for all files (which does not exist).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

When making an HttpWebRequest within a CLR stored procedure (as per the code below),
I'm trying to setup a development project for making a SharePoint solution. We have
We are making a game which will add a level editor feature soon. We
I'm making a website that shows you images. And special feature of site is
Making my first steps in RIA Services (VS2010Beta2) and i encountered this problem: created
Our development team is making the move to TFS 2010 from VSS. The company
I am making a search feature for a Job listing website. For that I
I'm considering making an existing mobile app into an open-source project. It has an
I'm making a trivia webapp that will feature both standalone questions, and 5+ question
By making use of the remote feature in vim, is it possible to reuse

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.