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

Can someone explain to me what steps is Visual Studio 2010 Executing when deploying a solution to a website ?

The concrete scenario I'm after is like this: Given a site collection ( http://sharepoint/ ). And Given a subsite ( http://sharepoint/testsite ) of the site collection web. I want to deploy a farm solution and activate it for the subsite.

I know it first does something like Add-SPSolution -LiteralPath "path/to/solution.wsp". Then it probably issues some command to get it Deployed.

Every time i run Deploy Solution in Central Administration > Solution Management it takes an extremely long time, and sometimes it does not even work. If I try it from PS it throws an error ( I'm probably missing some parameters ).

share|improve this question
    
What error does it throw? –  James Love Feb 8 '11 at 13:55
    
It says that it is already running. But that is not the point. I want to understand what steps visual studio is performing in order to get such speed for deployment. –  Mihai Lazar Feb 8 '11 at 14:00
    
Here you can read some background info about deploying a solution: msdn.microsoft.com/en-us/library/aa544500.aspx –  Anita Boerboom Feb 9 '11 at 11:44

1 Answer 1

up vote 0 down vote accepted

So I didn't get any answers from but I'll try to answer this one the best I can on my own. Here it goes:

Run the package command from Visual Studio ( I tried manually using makecab but that is a disaster ).

Once you have your package run using the powershell that comes with Sharepoint installation add-spsolution -LiteralPath "C:\Path\To\File.wsp"

I prefer to then run get-spsolution just to see it is in fact installed.

Next you do install-spsolution -Identity (either name or guid). I just copy paste the GUID from the previous command

NOTE: You should have Sharepoint Administration and Sharepoint Timer services started

You wait a couple of minutes and you have your solution deployed.

Next up you have to start your Features. I usually go like this enable-spfeature -Identity guid -GACDeployment. The identity of the feature you can view form your PROJECT-FOLDER\Package\Package.pkg

Always start with Farm features then move on to Site features and last go to Web features. Be very carefull what you execute at each step and try to keep things realted to site in it's repsective solution grouped at site level, and things related to web likewise in their own feature grouped at web level

share|improve this answer

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.