This solution contains no resources scoped for a Web application and cannot be deployed to a particular Web application

I am working on SharePoint, when I tried to deploy a WSP solution that contains an Event Receiver to a specific SharePoint web application, I got the following error message:

This solution contains no resources scoped for a Web application and cannot be deployed to a particular Web application

Cause:

Generally, Event Receiver should be deployed globally to all web application therefore, there is not a scope to deploy it to specific web application as written in the command when trying to install it.

Solution:

In case of, you don’t have the WSP solution source code,

You should deploy it globally by removing “-WebApplication http://sitename” from Install-SPSolution command, therefore, the command should be as the following:

Add-SPSolution "path of solution .wsp"
Install-SPSolution -Identity "solution name".wsp -GacDeployment -force

Untitled

To make sure that WSP solution has been installed and deployed successfully

  • Go to Central Administration > System Settings > Manage farm solutions.

Manage Farm Solutionsolutionmanagemnt

In case of, you are haveing the WSP solution source code

  • Go to the properties of your solution and change the Assembly Deployment Target from GlobalAssemblyCache.

assembllydeploymenttarget

  • To WebApplication.

assembllydeploymenttargetwebapplication

  • Build & Create WSP and try to deploy it again, It should now been deployed.

Enjoy 🙂

Advertisements

One thought on “This solution contains no resources scoped for a Web application and cannot be deployed to a particular Web application

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s