I am still struggling to find an efficient way to handle deployment in SharePoint 2010. It seems as if this wasn't thought throught very well by Microsoft.
I've had a look at the ideas here. These work OK if your goal is to move a whole site collection to a new environment. However, in my case, I have a single site with lots of subsites which must be moved to a different site collection. Importantly, there is also a somewhat complicated SharePoint Solution which was deployed from Visual Studio and needs to be moved to the new environment.
The SharePoint Content Deployment Wizard doesn't seem able to connect an SPWeb to a different site collection. Is there something I am just misunderstanding here? The second problem is deploying the code from Visual Studio, which the SPCDW does not do.
If I export my SPWeb using STSADM -o export -url [url] -filename [filename]
and then run the corresponding import command, I seemingly get the expected behavior of moving an SPWeb to a different site collection. However, the deployed Solution is not included. Trying to export this as a .wsp in Visual Studio targeted to the new Web and then after deployment installing it with STSADM -o addsolution
does not work either.
I'm stuck. Anyone have any good ideas? Is there a simple way to do this, or do these deployments always require a huge amount of custom PowerShell scripts, digging through the log files for errors and gnashing your teeth? The workaround thus far has been to install Visual Studio in the production environment, import site with STSADM and debug from there. But obviously, this isn't very elegant and probably breaks most "best practices".