开发者

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/200开发者_StackOverflow中文版8/SharePointTools/FeatureModel"
>
  <projectItems>
    <projectItemReference itemId="29f8daa7-e342-4e50-980c-9d132b55a26a" />
  </projectItems>
</feature>


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


I just created a new Visual Web Part project in VS 2010 to deploy in a SharePoint 2010 environment and I was able to see the scope attribute, even when I did convert it to web.

<Feature xmlns="http://schemas.microsoft.com/sharepoint/" Title="VisualWebPartProject1 Feature1" Description="My Visual WebPart Feature" Id="9d3f9e5f-f8ad-4201-a7dd-ab22c6c3c166" Scope="Web">

Once I close my solution and go via windows explorer to see the file, the scope attribute is gone.

So I did some poking around to see if there is any mention of the scope...

  • Solution (.sln): No
  • Project File: No
  • Package File: No
  • Feature XML: No
  • Feature designer -> Manifest: YES

I even did a search in Visual Studio to find any mention of the word Scope, and only got my spdata file that talks about deployment scope of the webpart and had a different value in it than my feature scope so I can't think that any of that is helpful.

I'm interested to know the answer now as well...

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜