SharePoint 2010 Development Tips & Tricks #1

Tags: Development, PowerShell, SharePoint 2010

Tip #1:  I recently came across an issue on my SharePoint 2010 development machine:  my console application could not open a SharePoint web application.  It turns out that, by default, Visual Studio 2010 targets the x86 platform when you create a new console application.  To allow the console application to open a SharePoint web application, you have to edit your project's properties in the Build tab of the properties page and set the "Platform target" to x64 or Any CPU.

Tip #2:  PowerShell makes the DOS command line utility look like a tool from the stone ages.  SharePoint 2010 has been brought up to speed with Microsoft's other server products in that PowerShell is the preferred command line utility to administer and script SharePoint.  Along with this, Windows Server 2008 has a built-in PowerShell Integrated Scripting Environment.  However, you have to install this as a feature of your Windows Server 2008 R2 development machine.  To do so, open up Server Manager, click the Features node, then Add Feature, and select and install the Windows PowerShell ISE.  Do you need the PowerShell ISE for PowerShell to work?  Nope.  Trust me when I tell you that you want it though.  It provides additional functionality like color-coding keywords and debugging amongst others.

Happy developing!