Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I have a web application in which I have few document libraries, lists, picture libraries, workflows and few webparts. The webparts are created using visual studio with the feature site scoped. WorkFlows are created using SPD. Everyting working fine in my local SharePoint server. I want to copy my web application to a different server. For this I saved the site template Site Actions-> Save Site as template, saved the wsp to my desktop. Then I took the wsp to the other server machine where i created a webapplication. Then using PowerShell command added the solution using Add-SPSolution command. When trying to install using Install-SPSolution command I got an error: This solution contains no resources scoped for a web application and cannot be deployed to a particular web application

I tried to change the scope of webpart feature to Web/WebApplication but encountered error when tried to deployed using visual studio.

How can I deploy the wsp in a different SharePoint Server machine?

share|improve this question
add comment

1 Answer

the error tells you that in your wsp package you try to add there are no web scoped resources. When you try to deploy your package you do not have to specify URL parameter. Try to remove this. It should look like:

Install-SPSolution –Identity $SolutionPackageNameNew -GACDeployment

If you do this with a script you can check if WSP have web scoped resources:

# Try to get new package on the site
$solution = Get-SPSolution | where-object {$_.Name -eq $SolutionPackageNameNew}

# check to see if new solution package has been installed
if($solution -ne $null)
{
   # Install solution
   if ($solution.ContainsWebApplicationResource) 
   { 
      Install-SPSolution –Identity $SolutionPackageNameNew –WebApplication $webApp -GACDeployment
   }
   else
   {
      Install-SPSolution –Identity $SolutionPackageNameNew -GACDeployment
   }

   do
   {
      # Wait for deployment to be completed
      Start-Sleep -s 1
   }
   while($solution.JobExists)
}

Hope it helps,

Andrew

share|improve this answer
    
Thanks. the soln is globally deployed. how can i create a site collection with this solution? –  Suja Shyam Apr 5 '13 at 6:39
    
I suppose you have a template (custom?) or out of the box. Do it using central administration or check this out: virtualizesharepoint.com/2012/01/03/… –  Andrew Adamich Apr 5 '13 at 6:48
    
I had saved the site template out of box Site Actions->Save Site as template and saved the solution from solution gallery. –  Suja Shyam Apr 5 '13 at 7:04
    
Go to central administration and try to create a site collection. But it seems to me that you do something wrong... –  Andrew Adamich Apr 5 '13 at 7:56
    
So no upvote or marked as answer? Thanks –  Andrew Adamich Apr 5 '13 at 9:16
show 3 more comments

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.