Search code examples
visual-studiovisual-studio-2010sharepointsharepoint-2010

Where Visual Studio SharePoint feature designer store scope?


Visual Studio has designer for editing the definition of SharePoint features. There is also setting for feature scope in the designer window. I'm really curious where this value is stored on the disk. When I open the *.feature file this value is missing there. On the other hand we can see a strange encrypted version attribute. See the .feature file:

<?xml version="1.0" encoding="utf-8"?>
<feature
    xmlns:dm0="http://schemas.microsoft.com/VisualStudio/2008/DslTools/Core"
    dslVersion="1.0.0.0"
    Id="07abccbd-9471-4780-8ee9-801fe4191e9b"
    alwaysForceInstall="true"
    isHidden="true"
    featureId="07abccbd-9471-4780-8ee9-801fe4191e9b"
    imageUrl=""
    solutionId="00000000-0000-0000-0000-000000000000"
    title="MyFeature"
    version="AAEAAAD/////AQAAAAAAAAAEAQAAAA5TeXN0ZW0uVmVyc2lvbgQAAAAGX01ham9yBl9NaW5vcgZfQnVpbGQJX1JldmlzaW9uAAAAAAgICAgBAAAAAAAAAAAAAAAAAAAACw=="
    deploymentPath="$SharePoint.Project.FileNameWithoutExtension$_$SharePoint.Feature.FileNameWithoutExtension$"
    xmlns="http://schemas.microsoft.com/VisualStudio/2008/SharePointTools/FeatureModel"
>
  <projectItems>
    <projectItemReference itemId="29f8daa7-e342-4e50-980c-9d132b55a26a" />
  </projectItems>
</feature>

Solution

  • The scope is stored in the .feature file as an attribute (//feature/@scope), BUT only if the scope isn't Web.