I’ve just started to look at SharePoint 2010 and from first glances it seems to be a bit nicer than SharePoint 2007 in terms of look and functionality for developers. Anyway the purpose of this post is to describe getting a fresh install of SharePoint 2010 working with Visual Studio 2010 to debug a straight forward hello world web part.
So once you’ve got your server built and ready to go and if you try and follow the MSDN HelloWorld sample http://msdn.microsoft.com/en-us/library/ms415817.aspx you will more then likely encounter the following errors.
Error occurred in deployment step 'Activate Features': Cannot start service SPUserCodeV4 on computer '[server]'.
This one is quite straight forward just fire up Server Manager –> Services and make sure that the “SharePoint 2010 User Code Host” service is enabled and set to start up automatically.
Next if you try and build your project you’ll receive:
Error occurred in deployment step 'Activate Features': This feature cannot be activated at this time. The contents of the feature's solution requires the Solution Sandbox service to be running.
To fix go to Central Administration
Under "System Settings" -> Manage servers in this farm
You'll see a list of services running, click on the server name.
Make sure "Microsoft SharePoint Foundation Sandboxed Code Service " is enabled.
Job done! Apparently this is by design as an out of the box install. Why doesn’t the MSDN HelloWorld artiicle tell you about these fundamental things!?
ded834fb-f08d-413b-ade2-4a8f146e4333|0|.0