Programming with SharePoint without Having SharePoint Installed
I'm not really a developer - I consider myself a hacker. Someone who can get something developed if all the real developers were stranded on a deserted island with no Internet access. However, one of the requirements for becoming a Microsoft Dynamics ERP partner is to have a team member pass the SharePoint 2010 Application Development test (70-573). Therefore, I need to pass this test, which means I had better figure out a thing or two about programming in SharePoint 2010.
I don't have SharePoint loaded anywhere - you can get a trial version of SharePoint 2010 here to install and test if you have Windows Server 2008 and SQL Server 2008 on a Virtual Machine or a Server. I tried to install that on my pre-release build of Windows Server 2012 to no avail. I then decided I could run it on my client machine (Windows 7 x64) and I found this good article about how to run SharePoint 2010 in a development environment. I followed those instructions (the step about extract the files is a little off - the .exe is called sharepointserver.exe and to extract it you type sharepointserver.exe /extract:c:\SharePointFiles) and installed SharePoint on my machine. However, when you try to configure SharePoint against a SQL Server 2012 install, you get another error. There's probably a workaround to this, but at this point, I was ready to move on.
I next downloaded the SharePoint 2010 SDK here, and that is a helpful thing to have. Unfortunately, it doesn't appear to bring the reference files with it. I opened up a sample solution from inside SharePoint because I needed something to look at to help me understand how the pages were going to work (all of the samples are in .zip files, so you have to extract them before you can find the .sln files). I opened up the SocialDataStatisticsWebPart solution, and of course, when I went to compile it, it wouldn't compile without the SharePoint assemblies.
I scoured the Internet to try to find the assemblies for SharePoint, but I just got a number of articles talking about how to register them once you have them. I realized I had a Dynamics AX VPC that had SharePoint installed, so I mounted that VHD and found the .dll files there. I copied them to the SharePoint SDK folder on my Windows 7 machine and registered them in Visual Studio by going to Project > Add Reference and browsing to the SharePoint SDK folder on my machine.
At this point, I am able to write sample code with the IntelliSense and references I need. This is probably more of a rant on how long it took me to get this to be usable, but I hope it helps someone save some time if they were in my same shoes.
Under the terms of this license, you are authorized to share and redistribute the content across various mediums, subject to adherence to the specified conditions: you must provide proper attribution to Stoneridge as the original creator in a manner that does not imply their endorsement of your use, the material is to be utilized solely for non-commercial purposes, and alterations, modifications, or derivative works based on the original material are strictly prohibited.
Responsibility rests with the licensee to ensure that their use of the material does not violate any other rights.