When I tried deploying/retracting a solution file (.wsp), got this error:
This solution contains no resources scoped for a Web application and cannot be deployed to a particular Web application.
This is because, This solution has a feature assembly that should be deployed to GAC globally, and not with a particular web application.
Simply remove the URL parameter from the command Line!
stsadm -o deploysolution -name <Solution-File-Name> -allowgacdeployment -immediate
If you want to make it available only to a particular web application, change the solution settings Assembly Deployment Target from GlobalAssemblyCache to WebApplication.
Or set the feature scope to WebApplication, so that SharePoint knows which web.config file to update in IIS while registering SafeControls. In another case, this was due to web.config safecontols entries missing. Make sure you have made safe control entries in the web.config file.