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

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

By:

Date:

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

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. SharePains is not just any blog run by a Microsoft MVP. Have you ever used Try-Catch in Power Automate? The original post about Try-Catch in Power Automate can still be found on this site, https://staging.sharepains.com/2018/02/07/try-catch-finally-in-power-automate-flow/ Or have you ever used the Pieter’s method to avoid variables and speed up your flows? https://staging.sharepains.com/2020/03/11/pieters-method-for-advanced-in-flows/ You can contact me using contact@staging.sharepains.com

2 responses to “Install-SPSolution : This solution contains no resources scoped for a Web application”

  1. moner@hotmail.com Avatar
    moner@hotmail.com

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

    Yu

    1. Pieter Veenstra Avatar

      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.