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 $ServerURL -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$ServerUrl -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


Discover more from SharePains

Subscribe to get the latest posts sent to your email.

Avatar of Pieter Veenstra

Is your business still running on paper trails, sprawling Excel files, or ageing Access databases? There's a better way — and I can show you exactly what it looks like. I'm the Technical Director of Vantage 365, a Microsoft solutions consultancy working with clients across the UK, the Netherlands, and worldwide. For over 30 years I've been turning messy, manual business processes into clean, automated systems that save time, reduce errors, and give teams the visibility they need to make better decisions. You can contact me using contact@sharepains.com

Related Posts

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.

Discover more from SharePains

Subscribe now to keep reading and get access to the full archive.

Continue reading