I love the new developer tools but the construction that Microsoft gives you can be challenging. For example: I have pretty much content type fields that I add to my SharePoint Feature. The structure looks like this:
The first thing one must notice is that even if there are not many SPI’s (SharePoint Project Items) the SharePoint project already looks pretty big. This structure is great for demo’s for example: For 5 items. But in large complex projects it is not the desired situation. The feature design mode is also nog workable in this situation. So I don’s think that Microsoft called the elements.xml file ELEMENTS in stead of element.xml for nothing. With that in mind let’s see what we can do to improve the overall structure. We can start with a empty SharePoint project where we add an content field type. This content field type got an XML file called Elements.xml. We now can edit this Elements.xml file to add the desired SPI’s (SharePoint Project Items) without causing any unwanted changes to overall the structuur in Visual Studio 2010:
Now we have 1 Elements file under the Content Type Fields with the same amount of SPI’s (SharePoint Project Items). This makes developing much easier. Not only is your treeview clean also the design views are still compact just like when Microsoft drops us a demo!