I am writing a sharepoint project deployment script using powershell.
It is a project contains three webparts, and two feature, one is at the farm scope and the other is at the site scope.
My current script has steps in the following order:
1. Disable -SPFeature for the site scope one
2. Uninstall -SPFeature for the site scope one
3. Disable-SPFeature for the farm scope one
4. Uninstall-SPFeature for the farm scope one
5. Uninstall-SPSolution
6. Remove-SPSolution
7. Install-SPFeature of the farm scope one
8 Install -SPFeature of the site scope one
9. Enable-SPFeature for the site scope one.
Currently, the script need to be run twice before the new changes is showing up in the sharepoint site.
If I deploy from Visual studio, I only have to deploy once and new changes are showing up.
I want to find out why. I looked at the log in 14 hive, it showed that Visual studio was doing some order of "deactive feature, uninstall, reinstall, then deploy solution...."
What is the proper order of the deployment?
Thanks.