Expand Minimize

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).

CheckId SPC060501
TypeName DoNotDeployFeatureFilesAsResource
Severity CriticalWarning
Type Resource

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" />

Disclaimer: The views and opinions expressed in this documentation and in SPCAF do not necessarily reflect the opinions and recommendations of Microsoft or any member of Microsoft. SPCAF and RENCORE are registered trademarks of Rencore. All other trademarks, service marks, collective marks, copyrights, registered names, and marks used or cited by this documentation are the property of their respective owners.