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

Bad deployment of file 'WebParts.xml':

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

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

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

comments powered by Disqus