One of the difficult aspects of working with SharePoint solutions in Visual Studio is the dastardly list Schema.xml file. This file maintains the structure and views of lists and libraries and is a necessary evil to deploying lists via SharePoint solutions and/or apps. Not only is the xml difficult to modify, but one simple character typo on this file could render the entire list or library unusable.
Microsoft wised up to the madness in SharePoint 2013 with the introduction of a simple GUI for editing and creating lists. But unfortunately, this functionality is limited to selecting new columns to add to the list. List views cannot be edited from the GUI. Neither can complex columns (ie. lookup or calculated columns) be configured using the Visual Studio GUI.
Thankfully SharePoint Manager comes to the rescue! SharePoint Manager is probably the most useful free, all-purpose tool available to SharePoint developers. This tool gives a bird’s-eye view into a wide range of SharePoint configurations, from viewing attached Event Receivers to finding the GUID of a SharePoint feature. There are SharePoint Manager 2007, 2010 and 2013 versions available for download. But the one limitation of this tool is that it’s available for on-prem solutions only! Office 365 users will not be able to make use of the tool.
Quick Tip! When first running SharePoint Manager, always be sure to run it as Administrator on the SharePoint WFW machine. You’ll want to make sure you’re logged in as a user with sufficient access privileges to the site in question.
With some creativity, SharePoint Manager can also help in the case of editing Schema.xml files. While the tool itself cannot generate or interpret Schema.xml, it can quickly show the structure of existing Schema.xml files. So if you have an existing list created from the SharePoint UI with the structure you need, theoretically you would only have to copy the xml relevant to the case.
In my case, I wanted to create a calculated column, but had no idea of the correct XML structure. So I created the column in a temporary list, opened it in SharePoint Manager and clicked on the “Schema XML” tab. I then copied the correct XML into my own Schema.xml file and everything worked like a charm.
For more on what’s new with SharePoint 2013, check out my series on safer code development…