Expand Minimize

Deploy the 'ReceiverAssembly' of a Feature to GAC

If a Feature references an assembly in attribute 'ReceiverAssembly' the assembly must be deployed to GAC. Otherwise the assembly could not be loaded during feature activation.

CheckId SPC012122
TypeName DeployFeatureReceiverAssemblyToGAC
Severity Error
Type Feature

Change the attribute 'DeploymentTargetType' of the assembly in solutions manifest.xml to 'GlobalAssemblyCache'. MSDN: 'The assembly that contains a Feature receiver must be located in the global assembly cache (GAC).'

To suppress this violation in XML SharePoint code add the following comment right before the XML tag which causes the rule violation. Learn more about SuppressMessage here.

<!-- "SuppressMessage":{"rule":"SPC012122:DeployFeatureReceiverAssemblyToGAC","justification":"Provide reason for suppression here"} -->
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.