none
A SharePoint server is not installed on this computer.

    Question

  • I get this message when trying to create a SP2010 web part project in VS2010 RC1.

    Is SP2010 a requirement for a VS2010 development environment?  I have SP2010 Beta on a virtual machine, and would rather not install VS2010 RC1 on it.

    My SP2007 development environment consisted of SP2007 on a VHD, and VS2005/2008 on the host.  I preferred deploying to my VHD and doing remote debugging.  We were able to install the WSS 3.0 SDK on the host without actually installing SP2007 via adding a simple reg setting "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Shared Tools\Web Server Extensions\12.0"  Sharepoint=Installed.
    Friday, February 12, 2010 4:23 PM

Answers

All replies

  • Having SharePoint installed is required.  It won't let you create a new project unless its present.  I remote debug a lot when MOSS 2007, but with all of the benefits in Visual Studio 2010, it is worth developing directly on the SharePoint server.
    Corey Roth blog: www.dotnetmafia.com twitter: @coreyroth
    Friday, February 12, 2010 4:57 PM
  • Hmm .. just tried something .. exported the following hive from the SP2010 server:  [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Shared Tools\Web Server Extensions\14.0]
    and installed it on my host.  I can now create SP2010 projects in VS2010.

    This is similar to the "fix" for getting the host to install the WSS 3.0 SDK.  For that one, all you needed was the SharePoint=Installed key.  Not sure what VS2010 needs in the SP2010 hive.

    Will post back if I find any issues.
    Friday, February 12, 2010 6:36 PM
  • Just confirmed .. was able to attach to the remote debugger on the SP2010 virtual machine from a host running VS2010.  If your interested in developing locally and remote debugging read on, otherwise follow Corey's advice :)  Once the plumbing is set up, it's pretty easy to remote debug.

    I'm using VS2010 RC1 and SP2010 Beta.

    Here are the steps to remotely build sharepoint components and remotely debug:

    Create, build, and deploy your code

    1.  Build a SP2010 virtual machine
    2.  Install VS2010 on the host machine
    3.  Export the hive [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Shared Tools\Web Server Extensions\14.0] from the virtual machine and install on the local machine
    4.  Create a webpart project in VS2010, build, and package.
    5.  Copy the wsp to the virtual machine and the pdb.
    6.  Deploy the wsp via Add-SPSolution.
    7.  Go to Run ... enter c:\windows\assembly\gac_msil, find your assembly, copy the pdb to the same folder as the assembly.

    Get the debugger running on the virtual machine

    1.  Copy Remote Debugger to SP2010 virtual machine .. found on host at:  C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\Remote Debugger
    2.  Create identical debug user accounts on both the host and guest machines and add to local administrator group on both machines (not sure if admin group is necessary).
    3.  On the virtual machine, start the msvsmon.exe, in the x64 folder using this command:
                 C:\Windows\System32\runas.exe /user:<your debug user account> /netonly "C:\Program Files\Microsoft Visual Studio 10.0\Common7\IDE\Remote Debugger\x64\msvsmon.exe"
    4.  On the virtual machine msvsmon, enter the password of the debug user account.
    5.  On the virtual machine msvsmon, go to Tools->Permissions, and grant the debug user account permission to debug.

    Attach to the process on the virtual machine from VS2010

    1.  Refresh the page your webpart resides on to get the w3wp process going.
    3.  On the virtual machine determine the process id of the w3wp instance your code is executing.  Not sure if IISApp.vbs is on Server 2008 R2, but this link provides a PS script to get the process id.
    4.  On the virtual machine, make a note of the name of the msvsmon instance ... mine is CORP\administrator@<server name>.
    5.  In VS2010, Attach to Process, and enter the name of the msvsmon instance in the Qualifier field of the window. 
    6.  Look for the instances of w3wp, and attach to the process id your code is executing in.
    7.  Now the obvious step ... set a breakpoint in your code, then refresh your page.

    Note:  5 & 6 are where most of the issues, if you have any, will take place.  If you are unable to see a list of processes running, or even attach to the remote debugger, something is wrong with your debug accounts.  Note the id and pwd must be identical on both the host and guest.  I have them both in the admin group.  Also, be sure your running the x64 debugger.

    Happy remote debugging.

    • Proposed as answer by Fernando A. Gómez Saturday, April 24, 2010 7:21 PM
    • Unproposed as answer by Darrin Bishop Wednesday, July 28, 2010 9:36 PM
    • Proposed as answer by R_Grant Monday, March 07, 2011 2:09 PM
    Friday, February 12, 2010 9:19 PM
  • Faced the same error. Exporting the hive from server and importing it on my development system worked. Thanks for this solution. Regards, Shweta
    Thursday, June 03, 2010 1:30 PM
  • Create, build, and deploy your code

    1.  Build a SP2010 virtual machine
    2.  Install VS2010 on the host machine
    3.  Export the hive [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Shared Tools\Web Server Extensions\14.0] from the virtual machine and install on the local machine
    4.  Create a webpart project in VS2010, build, and package.

    -- In the step that asks for "What local site do you want to use for debugging", what do you enter? I entered the address of the remote sharepoint server and it did not connect saying again "a local sharepoint server must be installed"...I am using Sharepoint 2010 trial version with VS 2010 Ultimate trial. Neither is beta. 
    Tuesday, July 06, 2010 6:41 PM
  • @jacobUT:

    I have the same problem. Copied the Hive as tlhost suggested. When I enter the sharepoint 2010 server and click validate, I get the same error "Sharepoint" not installed. Have you found a solution ?

    Wednesday, July 28, 2010 4:18 PM
  • @jacobUT:

    I have the same problem. Copied the Hive as tlhost suggested. When I enter the sharepoint 2010 server and click validate, I get the same error "Sharepoint" not installed. Have you found a solution ?


    Hi vasya10,

    I ended up installing VS 2010 on the same development server as SP 2010...So I didn't get remote debugging working successfully. I think its possible but there are some limitations on it. Not sure. Sorry!

    Thanks,
    Jacob.

    Wednesday, July 28, 2010 9:52 PM
  • HI

    I got this error when i tried to create a sharepoint project in VS2010. But VS2010 (RTM trial) was installed on the same Sharepoint2007 box. can any one suggest the possible solution.

    Thanks & Regards,

    Sekhar

     

    Wednesday, August 04, 2010 8:14 AM
  • Hi all,

     

    I have follow all the step of the tlhost solution and it's work proprely.

    I just have one problem : I can't create a project witch was deploy as a sandboxed solution ...

    I just want to know what can I do if there are a solution.

     

    Regards.




    Wednesday, June 29, 2011 7:21 AM
  • I wish MSFT would fix this. It is ludicrous to require that VS2010 and SharePoint be on the same server. Not required for ASP.NET nor any other form of development. And imo, best practice to keep these environments separate.
    • Edited by CodeSlinger Thursday, October 20, 2011 8:42 PM
    Monday, October 03, 2011 7:50 PM
  • I wrote a blog post on how to solve this issue, you can find it under

    http://blog.raminassar.com/2011/10/14/working-with-sharepoint-2010-projects-on-visual-studio-without-installing-the-server/

    wish this will help you

    • Proposed as answer by inderayana Tuesday, November 22, 2011 3:40 AM
    Friday, October 14, 2011 10:54 AM
  • Agreed, this is not nor ever has been a best practice at MSFT -- and most dev machines aren't powerful enough to run Server 2008.
    G. Steele at Sedgwick
    Thursday, October 20, 2011 7:08 PM
  • I did try this but could not create SP projects but did not get the error msg right off. Did not have time to persue though so perhaps something I messed up. I wish MSFT would officially support working with a remote dev server.
    Thursday, October 20, 2011 8:44 PM
  • Hi

     

    I followed Rami's excellent post.  on my work Win XP3 32-bit laptop with VS2010.  

     

    First  hive export and import ( tried the one from our server and the one I can download from Rami)


    I noted that IIS 5  (http://localhost) was not installed on my local win xp sp3 dev machine, so I added this via the cd image. I have also added IIS7.5 express via http://www.microsoft.com/web/gallery/install.aspx?appid=webmatrix  ( http://localhost:8080

    I rebooted win xp and then opened vs2010 and changed the site url to my local machine (http://localhost8080).

    1. In my case I created a web project for  a custom http module
    2. To the solution I added a Empty SharePoint project
    3. Next I attempt to a EventReceiver and then this ( ouch!)

     

    Annoying really as I all want to do is package up a .wsp.

     

    Any ideas.... THis hardware is not up to vs2010, either real or virtual.

     

    Daniel

    Wednesday, November 30, 2011 8:12 AM
  • 1. Build a SP2010 virtual machine 2. Install VS2010 on the host machine 3. Export the hive [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Shared Tools\Web Server Extensions\14.0] from the virtual machine and install on the local machine 4. Create a webpart project in VS2010, build, and package. I still can't create sharepoint project after importing the registry keys. What i tried is to create exactly same folder (in my local machine) C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\ISAPI port all the DLL from SP Server to my local machine. and it works!!!
    Wednesday, February 08, 2012 8:40 AM
  • After doing the 14 hive import, some people who do not have a remote SharePoint VM still faced the SharePoint Connection error when we have to put the SharePoint site link. I don't have a remote SharePoint VM as I want to create solution for SharePoint Online. I figured out, creating an Empty SharePoint project can be a solution to it.

    But what I learnt is that I was able to add all project items to it, except Workflow. When I tried to add Workflow to the solution, the error - "Cannot connect to the SharePoint site" popped up again! We need to find a permanent workaround for sure,  don't care Microsoft officially recommends something else.

    Why is the 14 hive import still not solving the issue ? Any workaround friends to this ?

    Thursday, February 23, 2012 9:43 PM
  • I have a blog post on how to solve this issue http://blog.raminassar.com/2011/01/14/working-with-sharepoint-2010-projects-on-visual-studio-without-installing-the-server/

    Regards,
    Rami M. Nassar
    (MCP, MCTS, MCPD)
    My Blog
    E-Mail
    Don't forget to click Mark as Answer on the post that helped you.

    Thursday, February 23, 2012 10:26 PM
  • Hi Rami,

    Yes, I have read both your posts and have bookmarked it before I posted my comment. Indeed a great job. But the two issues still remain -

    1. I learnt is that I was able to add all project items, except Workflow. When I tried to add Workflow to the solution, the error - "Cannot connect to the SharePoint site" popped up again! Rest all items are working fine and can be added to solution.

    2. When I use "VS 2010 SharePoint Power Tools" to build Sandboxed solutions, the WSP built using this method does not run on SharePoint Online!

    I guess juniors like us expect seniors in the Community to take intiative and build a solution over CodePlex which can be a good workaround.

    Friday, February 24, 2012 6:22 PM
  • The registry approach is indeed working

    It is not the "Installed" value that resolves the issue. In my case it was the Location value.

    Set-ItemProperty -Path "HKLM:\Software\Microsoft\Shared Tools\web server extensions\14.0\" -Name "Location" -Value "C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\"

    http://tomvangaever.be/blogv2/2013/03/sharepoint-2010-import-solution-package-exception-sharepoint-not-installed/


    blog: http://www.tomvangaever.be

    Wednesday, March 20, 2013 6:52 PM
  • I installed VS 2010 Professional onto my SharePoint 2007 farm server.  I still get the error message, " A SharePoint server is not installed on this computer..." 

    Rose

    Thursday, April 11, 2013 10:06 AM