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
FYI, I have also installed VS2010 AFTER I had installed and configured SP2010 but my User Code Service was running just fine – did not have to manually start it (I don’t have the VS2010 deployment problem you are describing in your blog post btw). Perhaps it’s the type of SP2010 installation? I installed the simple one that installs SQL Express.
I installed the complete SP2010 version and installed SQL Server 2008 on the box as well. Maybe it has something to do with that indeed, who knows.
On my machine it occured because my server is also the Domain controller. When SharePoint 2010 Beta was installed, it did not automatically set up the sandbox solution capability. I had to activate the functionality using PowerShell as described here: http://blogs.msdn.com/opal/archive/2009/11/16/installation-notice-for-sharepoint-2010-public-beta.aspx
Once that was done, I still had to enable the service on the server, as you show above.
That was the sequence for me.
The VM I installed SharePoint on, is a DC as well, so it might actually have something to do with that, since that’s mentioned in the URL you linked as well. I didn’t have to go through that procedure though, just enabling the service seemed to work here, but I’ll do some further testing once I get the chance. Thanks for posting the link
Same thing for me, the service was not running. I’m installed it with SQL 2008.
Thanks, this post probably saved me 10 hours work
In my case it was “Microsoft SharePoint Foundation Sandboxed Code Service” that I needed to start when trying to deploy a sandboxed solution.
Pingback: VS 2010 : Cannot start service SPUserCodeV4 « Ideas For Free
I started Microsoft SharePoint Foundation Sandboxed Code Service to deploy a sandboxed solution.
Big Thanks to Leo
Thanks my problem solved
In my case, I used a VM from a coworker and to solve this error I had to delete the site collection and make a new one.
Pingback: SharePoint 2010 Hosting :: Tips SharePoint 2010 Development Environment « Sharepoint 2010 Hosting News (SuperBlogAds Network)
I have installed sharepoint foundation in my machine and the error got rectified by by following steps as specified in http://sharepoint-snippets.com/error-occurred-in-deployment-step-activate-features-cannot-start-service-spusercodev4-on-computer/.
It worked. Thanks