Scenario:
You scoped your solution to WebApplication and trying to deploy the solution to a particular Web Application
Error:
This solution contains no resources scoped for a Web application and cannot be deployed to a particular Web application.
OR
This solution contains no resources scoped for a Web application and cannot be retracted from a particular Web application.
Reason:
Its because of the parameters passed to STSADM , basically features included in the solution does not contain an assembly which can be scoped to a particular Web Application. What ever assemblies are part of solution are suppose to go GAC and that makes solution a candidate for Global deployment.
Resolution:
Before you read the resolution below: Here's a comment that seems to be more better solution
"Better fix your solution by adding some dummy element that will make the solution deploy-able to a web application. If you have multiple web applications in your farm, usually you don't want to deploy your feature to all of them."
If that is not possible
Remove the URL parameter from STSADM. Do not use the Url parameter with the STSADM command while deploying or retracting such a solution
e.g. stsadm -o deploysolution -name SolutionFileName -local
stsadm -o retractsolution -name SolutionFileName -local
14 comments:
thank you , it helped me.
Short and sweet. I would have had to spend hours if I had not stumbled on this post. Great work. Thanks a lot.
Ronney
Better fix your solution by adding some dummy element that will make the solution deploy-able to a web application. If you have multiple web applications in your farm, usually you don't want to deploy your feature to all of them. This is like asking for trouble.
it sure helped a lot, thanx for that
Thank you. It helped me too, after half day of search.
Hi there
Yes saved me time as well.
"Better fix your solution by adding some dummy element that will make the solution deploy-able to a web application. If you have multiple web applications in your farm, usually you don't want to deploy your feature to all of them."
In the case of a solution with say 3 features: do you mean one or more features that have say "Web" scope and then you can deploy your feature to your desired web app and not globally; even though there is a dll deployed in the gac
Thank you.
It worked for me.
thanks a lot. nice explanation.
Can you provide an exmaple of a 'dummy' element?
Thanks
You got the error while deploying ..right ? remove the -url parameter from your deployment command and you will be fine.
thnx alot, deployed and retracted now , but how i can register the solution to a custom list ?? my solution is event receiver !!!
in your solution you can have a feature with feature receiver which can attach your event receiver to a particular list
Thanks for your suggestion. This worked like a charm for me.
This is insufficient as when you run the suggested command - the WSP will be deployed GLOBALLY, and not to a particular WEB APPLICATION that you want !!!
Post a Comment