Install-SPSolution : This solution contains no resources scoped for a Web application

Install-SPSolution

Today I tried to deploy a solution through PowerShell with the command:

Install-SPSolution–Identity helpdesk.wsp–WebApplication http:/ /myserver/-GACDeployment

I then got the following error:

Install-SPSolution : This solution contains no resources scoped for a Web application and cannot be deployed to a particular Web application.

At C:\Users\Administrator\Downloads\HelpDeskTemplate\HelpDesk\installsolutions.ps1:68 char:4

+ Install-SPSolution –Identity helpdesk.wsp –WebApplication http:/ /myserver/ -G …

+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

+ CategoryInfo : InvalidData: (Microsoft.Share…InstallSolution:SPCmdletInstallSolution) [Install-SPSolution], SPException

+ FullyQualifiedErrorId : Microsoft.SharePoint.PowerShell.SPCmdletInstallSolution

A bit silly of course. This .wsp contains only a site definition and with the above command I was trying to deploy the solution to a specific SharePoint application. As this template is used within Central Admin to create a new site collection this should fail.

The solution

Run the command without the WebApplication switch:

Install-SPSolution–Identity helpdesk.wsp -GACDeployment

2 thoughts on “Install-SPSolution : This solution contains no resources scoped for a Web application

  1. Thanks for the notes. However I wonder why the “WebApplication” switch was provided then !!!!

    Yu

    1. Hi Yu,

      The WebApplication switch is there in case there are web application scoped features/resources in your solution and you want to deploy the solution to a limited set of applications.

      Thanks,

      Pieter

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: