Category Archives: sharepoint

Problems installing SharePoint 2010 Beta 2 – SQL Server at XXX has an unsupported version 10.0.2531.0. The minimum required SQL versions…..

First little problem I came across when installing SharePoint 2010 was the following error:

SQL Server at XXX has an unsupported version 10.0.2531.0. The minimum required SQL versions are SQL Server 2005 SP3 CU3, version number: 9.00.4220.00, downloadable from “”, or SQL Server 2008 SP1 CU2, version number 1.00.2714.00, downloadable from “”.


CU stands for cumulative update. I was missing the cumulative update for SQL Server 2008, once that was applied setup would allow me to continue.

Tagged ,

SharePoint can not debug assemblies

If you are ever having problems getting Visual Studio to break into your code and you develop by deploying your dll’s into the GAC, it’s probably down to mismatching PDB’s.

  1. Do a Clean Solution
  2. Rebuild the solution
  3. Re-Gac all your dll’s
  4. Reattach to IIS processes

Other hints

Locked files in the GAC

Some times a process will take a lock on an assembly and if, like me, you use WSPBuilder to re-gac your assemblies, you might not notice that it fails to re-gac them. Crack open process explorer, find the rogue process and “Get Some”. Usually Visual Studio is the culprit here.

Tagged ,

Shared Services Administration: Add Audience Rule – No exact match was found. Error

Trying to setup an audience this morning based on being a “Member Of” an Active Directory group. The Active directory group had been created earlier, however entering it into the value field kept producing the annoying


No exact match was found.

Your mileage may vary but I solved this issue by:

  • Running a full import on my user profile
  • Updating the people scopes
  • Running an IISRESET
Tagged , ,

How to add an image web part / ImageWebPart part via your onet.xml or elements manifest

<AllUsersWebPart WebPartZoneID="RightZone" WebPartOrder="4">
      <WebPart xmlns:xsi="" xmlns:xsd="" xmlns="">
        <Title>Employee Emergency Line</Title>
        <Description>Use to display pictures and photos.</Description>
        <PartImageSmall />
        <Assembly>Microsoft.SharePoint, Version=, Culture=neutral, PublicKeyToken=71e9bce111e9429c</Assembly>
        <ImageLink xmlns="">/SiteCollectionImages/logo.gif</ImageLink>
        <AlternativeText xmlns="" />
        <VerticalAlignment xmlns="">Middle</VerticalAlignment>
        <HorizontalAlignment xmlns="">Center</HorizontalAlignment>
        <BackgroundColor xmlns="">transparent</BackgroundColor>

Properties of note:

  • ImageLink
    Url to image, can be relative. Note tokens are supported in this xml element, i.e. ~SiteCollections/SiteCollectionImages/logo.gif
Tagged , , ,

How to add a content editor web / ContentEditorWebPart part via your onet.xml or elements manifest

<AllUsersWebPart WebPartZoneID="TopZone" WebPartOrder="2">
	<WebPart xmlns:xsi="" xmlns:xsd="" xmlns="">
        <Title>Web part title</Title>
        <Description>Web part description</Description>
        <Assembly>Microsoft.SharePoint, Version=, Culture=neutral, PublicKeyToken=71e9bce111e9429c</Assembly>
        <ContentLink xmlns="" />
        <Content xmlns="">
         &lt;div class=&quot;ms-sblink&quot;&gt;
           &lt;a href=&quot;javascript:HelpWindowKey('how_content_is_searched')&quot;&gt;
        <PartStorage xmlns="" />

The important part here is to remember to html encode the Content element. You can encode html online using this handy website:

Tagged , , ,

How to add a list view web part to onet.xml or your elements manifest


 <View List="Lists/Registrations" BaseViewID="3" DisplayName="Pending Registrations" Name="Pending Registrations" RecurrenceRowset="TRUE" WebPartZoneID="Left" WebPartOrder="1">
             <WebPart xmlns="">
                  <Assembly>Microsoft.SharePoint, Version=, Culture=neutral, PublicKeyToken=71e9bce111e9429c</Assembly>
                  <Title>Pending Registrations</Title>

BaseViewID: Optional Integer. Specifies the ID of the base view. BaseViewID has a corresponding property on SPView

For more information hit up MSDN:

Tagged , , , ,

Restoring an old friend – Visual Studio 2008 Create GUID tool

Remember to recreate a link to guidgen.exe (Guid generator tool) after installing Visual Studio 2008. For some reason it’s no longer out of the box?


  1. Choose the Tools -> External Tools...
  2. Title: Create &GUID
  3. Click the Browse (…) button and find the guidgen.exe in the C:\Program Files\Microsoft SDKs\Windows\v6.0A\Bin\ folder.

See a better crafted posting with pretty pictures and idiot proof step-by-step guide@

Tagged ,

SharePoint Page layout throws “Parser Error Message: Only Content controls are allowed directly in a content page that contains Content controls” during provisioning.

If you see something like this:

Line 42:     </WebPartPages:WebPartZone>
Line 43: </asp:content>
Line 44: <html xmlns:mso="urn:schemas-microsoft-com:office:office" xmlns:msdt="uuid:C2F41010-65B3-11d1-A29F-00AA00C14882"><head>
Line 45: <!--[if gte mso 9]><xml>
Line 46: <mso:CustomDocumentProperties>

This could be (it was in my case) caused by a very obscure behaviour of the web part manager during provisioning. Namely it doesn’t like your <asp:Content tags to be defined in lower case.

Wrong: Error prone page layout








Yet another SharePoint time waster! 🙂

Tagged ,

Performance profiling SharePoint sites using Redgate ANTS Profiler

I used the 5.0 evaluation copy of  RedGate ANTS profiler tool on a standard Windows Sever 2003 R2 / SharePoint 2007 virtual machine.

To get profiling working with my SharePoint code base I made the following adjustments:

  • Allow site collection administrator to “Act as part of the operating system” and “Impersonate a client after authentication” and to Administrators group – All this was already the case.
  • Run “ANTS Performance Profiler 5 Service” and “ANTS Memory Profile 5 Service” under the site collection administrator account
  • Copied my applications dll’s and pdbs from GAC to web application bin folder, as I was previously using the GAC.

A complete guide to setting up ANTS profiler with SharePoint

The ANTS profiler is extremely easy to use and it quickly helped me narrow down some issues using XlstCompiledTransform objects.

Tagged ,

The template you have chosen is invalid or cannot be found.

I lost 3 hours of my life to a stupid collision of template ID’s. Creating a site collection or child web based on one of my custom templates kept failing with the following UI error message

"The template you have chosen is invalid or cannot be found."

The SharePoint logs were less than helpful:

02/15/2009 14:32:22.97     output.exe (0x10CC)                         0x1E14    Windows SharePoint Services       General                           72k2    High        Failed to apply template "xxxxxx#0" to web at URL http://xxxxxx/sites/test2, error The template you have chosen is invalid or cannot be found. 0x81071e44    

02/15/2009 14:32:22.97     output.exe (0x10CC)                         0x1E14    Windows SharePoint Services       General                           8kh7    High        The template you have chosen is invalid or cannot be found.  


Make sure all of the site definition configurations located in %programfiles%\Common Files\microsoft shared\Web Server Extensions\12\TEMPLATE\1033\XML have a unique IDs. Microsoft suggests ID values above 10000 to avoid conflicts with future Microsoft supplied site definitions ( Most custom site definitions therefore use 10001 and if two site definitions have the same ID you wind up wasting several hours trying to figure out why it’s not provisioning your site definition.