Monday, August 11, 2008

This solution contains resources scoped for a Web application and must be deployed to one or more Web applications

Scenario:
You scoped your solution to WebApplication and trying to deploy the solution globally.

Error:
This solution contains resources scoped for a Web application and must be deployed to one or more Web applications.

Reason:
One or more features have assemblies associated with the it and you missed the Url parameter for STSADM to deploy it to a particular Web Application.

Resolution:
Include the Url parameter with the STSADM command while deploying the solution.

e.g. stsadm -o deploysolution -name SolutionFileName -url http://servername/ -local

3 comments:

Beren October 13, 2009 at 10:21 AM  

I experienced the same error for a dll that didn't have any resourses and had to be deployed in GAC.
So, after some tests, I discovered that the problem is related to a reference to a dll that had the CopyLocally set to true. After turn it to false all works fine.

Cheers,
Beren

Anonymous,  July 27, 2011 at 1:07 PM  

Worked like a charm. Thanks so much.