Thursday 29 September 2011

Error occurred in deployment step 'Retract Solution': Cannot start service SPUserCodeV4 on computer


This week I was creating my first SharePoint 2010 Sandboxed solution using Visual Studio 2010.  I have successfully built and deployed other SharePoint projects on the server but I always used Farm based solution due to the requirements.
When I built the Sandboxed solution the project would build and package without any errors but when I tried to deploy it to the SharePoint site the following error occurred:
Error    1    Error occurred in deployment step ‘Activate Features’: Cannot start service SPUserCodeV4 on computer ‘SERVERNAME’ 0    0    SP2010Test
The error can be easily resolved by starting the Microsoft SharePoint Foundation Sandboxed Code Service which can be accessed through the Central Administration site in SharePoint.   Open the Central Administration site and go to System Settings and click on Manage Service on server:
Check to see if Microsoft SharePoint Foundation Sandboxed Code Service  is running, it should be stopped :

Start the service and try deploying the Sandboxed solution.