SP2010 – SPUserCodeV4 – Your new web part project isn’t deploying?

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>”.

Visual Studio 2010 - SharePoint project deployment error

Visual Studio 2010 - SharePoint project deployment error

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”

SP2010 User Code Service

SP2010 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!

VS2010 Sharepoint Project Deployed

VS2010 Sharepoint Project 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 :)

Be Sociable, Share!

16 thoughts on “SP2010 – SPUserCodeV4 – Your new web part project isn’t deploying?

  1. 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.

  2. 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.

  3. Hi,

    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.

    Best Regards,
    Nilesh Mehta

  4. 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 :)

  5. In my case it was “Microsoft SharePoint Foundation Sandboxed Code Service” that I needed to start when trying to deploy a sandboxed solution.

  6. Pingback: VS 2010 : Cannot start service SPUserCodeV4 « Ideas For Free

  7. I started Microsoft SharePoint Foundation Sandboxed Code Service to deploy a sandboxed solution.

    Big Thanks to Leo :)

  8. Pingback: SharePoint 2010 Hosting :: Tips SharePoint 2010 Development Environment « Sharepoint 2010 Hosting News (SuperBlogAds Network)

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="" highlight="">