So you’ve just gone through all the trouble to get the new SharePoint 2010 beta installed with the new Visual Studio 2010 beta alongside of it. You’ve created your first web part project and you’re ready to deploy!
Only one minor issue though, when you try to deploy, you’re getting an error, saying that “Cannot start service SPUserCodeV4 on computer <computername>”.
Although the screenshot shows an error with retracting, I was getting the same error when deploying. I figured, maybe it works if I deploy it again, but alasÂ :)
The error is related to a service not being started on the SharePoint server. In order to start it, do the following:
- Go to Central Administration -> System Settings -> Manage services on server
- Locate the service “Microsoft SharePoint Foundation User Code Service”
On my server it wasn’t started by default. I’m not sure if something went wrong during installation and that this service should be enabled by default. Just click the “Start” link button to start the service.
Now go back to Visual Studio 2010 and retry deploying your solution. In my case, this did the trick; the project was deployed successfully deployed!
Thinking about it, it might have something to do with the order of installation. I installed Visual Studio 2010 after I installed and configured SharePoint 2010. Maybe for some reason SharePoint only picks this up when it can find a Visual Studio installation or something like that. Not too bothered to find out though, the installation took a few precious hours and I don’t really feel like doing all that again