PowerShell · SharePoint

SharePoint 2013 – Install-SPSolution : This solution contains no resources scoped for a Web application and cannot be deployed to a particular 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

Advertisements

2 thoughts on “SharePoint 2013 – Install-SPSolution : This solution contains no resources scoped for a Web application and cannot be deployed to a particular Web application.

    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

      Like

Please leave a comment or feedback

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