Do not deploy empty Assemblies |
Assemblies without custom classes should not be deployed to SharePoint. This helps to reduce unneeded IISResets during deployment.
CheckId | SPC060206 |
---|---|
TypeName | DoNotDeployEmptyAssemblies |
Severity | Warning |
Type | Assembly |
Remove empty Assembly from Solution.
Sometimes it may be necessary to deploy an empty assembly. One reason could be to avoid a 'Globally' deployment of the Solution and enforce the deployment 'per Webapplication'. This can achieve by adding a 'SafeControl' to the manifest.xml. But this makes an assembly necessary which may be empty.
Visual Studio automatically includes the assembly in WSP packages. To avoid this set property 'Include Assembly in Package' to FALSE.
To suppress this violation in managed code add the following attribute to the method which contains the instruction (available since SPCAF version v5.2). Learn more about SuppressMessage here.
[SuppressMessage("SPCAF.Rules.DeploymentGroup", "SPC060206:DoNotDeployEmptyAssemblies", Justification = "Provide reason for suppression here")]