SharePoint Experts, Information Architects, Expert Witness

We provide consulting in a broad array of business and technology from architecture to design to deployment of global systems with a focus on surfacing data in the enterprise. Specialists in Microsoft, we are a premier provider of SharePoint Expertise (including 2016 and Office 365). We also provide Expert Witness/Legal Expert in eDiscovery, source discovery, patent infringement, piracy and more! We also have established SICG DLDS s.a. - our counterpart in Costa Rica that specializes in water systems ( - Contact me direct: or call 704-873-8846 x704.

Search This Blog

Friday, July 22, 2011

Visual Studio 2010 Project Error AssemblyInfo.cs could not be opened

Discovered this from a client site source code review...

So you open a project in Visual Studio 2010 and get an odd error:
Source file '<Project Location>\Properties\AssemblyInfo.cs' could not be opened ('Unspecified error ')
What this means is that the AssemblyInfo.cs file is either missing from the Properties folder in the project or there is a permissions issue. If permissions, update the ACL (File > Properties > Security), close and re-open the project. If missing altogether, you just need to recreate it using the following steps:
  1. Within Visual Studio 2010, select Tools > Create GUID
  2. Click Copy (or New GUID then Copy)
  3. Click Exit
  4. Expand the Properties folder in the Solution Explorer (Control + W, S to open)
  5. Delete the AssemblyInfo.cs file shown with the exclaimation point
  6. Double click on the Properties folder - this should open the Properties window
  7. On the Application Tab, click the Application Information... button
  8. Fill in the application information, paste the GUID you copied into the GUID field - when done click OK
Viola - problem solved...

One FYI - if the project requires a specific GUID, you can set it - if not known, you have no choice but to create one.

Friday, July 15, 2011

Annoyances in PowerShell

So you are trying to run a PowerShell and keep getting:

Suggestion [3,General]: The command <script file> was not found, but does exist in the current location. Windows PowerShell doesn't load commands from the current location by default. If you trust this command, instead type ".\<script>.ps1". See "get-help about_Command_Precedence" for more details.

This generic error is pretty much what you will see for anything, even if the file does not exist. One of my clients was trying to run Invoke-AlertFixup in SharePoint and kept getting this error even when correctly opening it as:


The fix is quite simple - simply enter:

$env:PATH = $env:PATH + "."

then enter the .\<script>.ps1 - Viola!

Wednesday, July 13, 2011

Borders on images in the Summary Links Part SharePoint 2010

A first, a client recently reported having difficulties with a Border showing up around images when using the SharePoint 2010 Summary Links part. Thinking it was something quick, we tried adding a style update to the master, the page layout and even tried the content editor part with no luck. I did some digging around and finally found the 'correct' answer from a post by Amit Kumar. The real reason for this problem is that the XSL for this part is rendered separately as a server side control; by the time the page is rendered and styles kick in it is too late. It does appear that it has to do with IE8/IE9 settings somehwere - not all users experience the problem.

The fix is quite simple - open the Site in SharePoint Designer, open the Style Library then the XSL Style Sheets folder and edit the SummaryLinkMain.xsl style sheet. Search for 'presense-status-icon' and you'll find the style as follows: 

<span class="presence-status-icon">
<img src="/_layouts/images/imnhdr.gif" onload="{concat($prefix, @SipAddress, $suffix)}" ShowOfflinePawn="1" id="{concat('MWP_pawn_',$slw_clientid,'_',$id,',type=sip')}"/>

Now modify the <img tag and add 'border="0"' as follows: 

<span class="presence-status-icon">
<img src="/_layouts/images/imnhdr.gif" border="0" onload="{concat($prefix, @SipAddress, $suffix)}" ShowOfflinePawn="1" id="{concat('MWP_pawn_',$slw_clientid,'_',$id,',type=sip')}"/>

Save and check in (very important) the file and you should be good to go. Note that you 'might' have to run an IIS reset and/or dump IE cache.

Tuesday, July 12, 2011

Fastest way to create a custom ListDefinition 2010

As we all know, it can be a real pain to code out a custom list definition in SharePoint. Sure, not complicated but sheesh - enough with the typing!

Anyway, quick tip on getting the proper Schema information when you want to create a list. Create the majority of the list in SharePoint (views, etc. too). When done, you can use the following:

http://<Site URL>/_vti_bin/owssvr.dll?Cmd=ExportList&List=<ListGUID>

Note that if you navigate to a list and go to list settings, the "List=GUID" is there for you to copy.

The benefit of this method is that the Schema for the list is 'complete' and has all views, references to existing site columns, etc.

Friday, July 8, 2011

SharePoint 2010 ListDefintion Edit Fails with "Object reference not set"

So you create a new custom List Defintion in SharePoint 2010 - deploy it to the site and it creates fine. You even add an item and works but then you go to edit it and you get either the dummy error page or you get "Object reference not set".

Turns out the problem is quite easy to fix - it simply means that one of the fields you created in the list has a duplicate GUID (or you used one that is already in use by another field) OR you didn't add the the a field in the <FieldDefs> section.

Check the FieldDefs first and if they look OK, it is probably a GUID - simply go back through your Schema.xml file and check each one of the GUID's - be sure all of them are unique and that you DON'T change the GUID of the Title, LinkTitle or LinkTitleNoMenu fields if you are modifying them (i.e. like changing the display name). In one case I had to change each field until I found the offending one. Don't forget to use the MakeGuid utility (either through Visual Studio : Tools > Create GUID) or you can always download it.

FYI - Many of us end up changing the Title field - for this field, the following GUID's apply:
  • Title | fa564e0f-0c70-4ab9-b863-0177e6ddd247
  • LinkTitle | bc91a437-52e7-49e1-8c4e-4698904b2b6d
  • LinkTitleNoMenu | 82642ec8-ef9b-478f-acf9-31f7d45fbc31
If you want to change the Title field (the display name for example), you have to specify the field just like those you are creating but being sure to use the Name/StaticName and GUID's from above.