SPC060501: Do not deploy Features ElementFiles as Resources

Resource files can be used to deploy resources to an existing Feature folder. If the target Feature is part of the same solution package binary files should be deployed as ElementFile in the Feature. If the target Feature is not part of the package it does make sense to use Resources (e.g. to deploy additional languages to existing features).

TypeName: DoNotDeployFeatureFilesAsResource
CheckId: SPC060501
Severity: CriticalWarning
Type: ResourceDefinition
Resolution

Bad deployment of file 'WebParts.xml':

<Solution xmlns="http://schemas.microsoft.com/sharepoint/">
   <Resources>
      ...
      <Resource Location="FEATURENAME\WebParts.xml" />
      ...
   </Resources>
   <FeatureManifests>
      <FeatureManifest Location="FEATURENAME\feature.xml" />
   </FeatureManifests>
</Solution>


Better depoy the 'WebParts.xml' as ElementFile in the Feature FEATURENAME:

<Feature xmlns="http://schemas.microsoft.com/sharepoint/" ... >
   <ElementManifests>
      ...
      <ElementFile Location="WebParts.xml" />
      ...
   </ElementManifests>
</Feature>

comments powered by Disqus