Most often you want your customsolution to be deployed to only a specific webapplication but SharePoint won’t allow it.
It’s actually very easy to fix this by tricking SharePoint.
In your package manifest you add a safe control:
<Solution xmlns=”http://schemas.microsoft.com/sharepoint/”>
<Assemblies>
<Assembly Location=”dll_name_of_your_solution.dll” DeploymentTarget=”GlobalAssemblyCache”>
<SafeControls>
<SafeControl Assembly=”dll_name_of_your_solution,Version=1.0.0.0,Culture=neutral, PublicKeyToken=****************” Namespace=”namespace_of_your_solution” TypeName=”*” />
</SafeControls>
</Assembly>
</Assemblies></Solution>