Feature/Elements/Schema/etc. XML generator/editor?

Oct 27, 2008 at 3:29 PM
Edited Oct 27, 2008 at 3:35 PM
I was wondering if your solution includes the posibility of generating the XML files (for features, content type definitions ,field definirios, and other artifacts) from a visual editor.

Right now, as far as I could see, you can, for instance, right clic -in the contoso training project- on the content types folder, select the "Add item" context menu option, and then add a new content type element that can inherit from one of the SharePoint  built-in content types. What you get as a result of this action is a new folder under the content types folder named after the content type name you chose, plus an XML file with the skeleton of a content type definition (I guess the same is valid ofr other SP artifacts). Then I guess I have to write the fieldref tags "by hand".

What I'm asking is if you provide a visual editor (some sort of winform) por each artifact XML definition file (conten types, lists, fields etc.) where you can define the XML from scratch, or maybe "pick" an existint artifact from Sharepoint (again, a "live" developer PC Sharepoint instalation content type, for instance) from some sort of "Sharepoint browser" and generate the corresponding XML.

It could be a mixed scenario in which we use SP to create the "live" artifacts -as we would use the SQL Management Studio to create, say, the tables- and then we can pick any table (or another SQL object) and generate the corresponding script (XML definition files in our case) you know what I mean?

A even better scenario would be to have someting like SQL Compare for SharePoint... but maybe that's a bit too much :-)

Thaks in advance for your response,


PS: Your current solution is great as far as I can see. Did Tommy Segoro have anything to do with it?
Oct 27, 2008 at 6:50 PM
Hello Adrian,
Those are all really great suggestions. We won't be able to provide anything like you mentioned in the version of the guidance since we are slated to go live next week, but we are considering the possibility of some automation tools in our next version of the guidance. So keep coming back to our codeplex site for updates on the next version of the guidance. You can use the Visual Studio 2008 Extensions for SharePoint to extract artifacts from existing sites using the Solution Generator tool. It won't be able to extract everything but some things. Take a look at that tool, and see if it helps at all. Thanks for your comments.
Oct 28, 2008 at 8:25 PM
Thanks charles! In the meantime I'll try to do it myself.


Nov 17, 2008 at 2:32 PM
Hi Charles,
We've been working on the aforementioned "XML generator", and we were able to itegrate some sort of "Sharepoint Explorer" treeview as a Visual Studio tool window from which we can generate XML for the differente SP artifacts, e.g., contente types.

We actually generate the XML with the form required by the team site definition project type (just as if we had added it from the "Add new item..." context menu option).

Well, so much for introduction, here is our little problem: We can add the mentiond XML file to the project, but it is not being included in the WSP.

As far as we could see, we also need to add some files and folders to the pkg folder too, but we still are missing something, because when adding, for instance, a new content type entry (created by our XML  generator) to the solution.xml file, it gets not only ignored, but this "manually" added entry is deleted from the solution.xml file when we refresh the "WSP View" window.

The question is: How do we mimic the behaviour of the "Add new item" action of a Team Site Definition project type so we "write" whatever info/files/folders is needed? I mean, what should we write/store/create and where?

Thanks in advance!!!

Nov 17, 2008 at 5:31 PM
can you check to see if your <Elements > tag has an "Id" attribute? In order for your feature elements to be included by VSeWSS, it must have an Id. You can use Visual Studio to generate a Guid and use it as the Id for your <Elements> tag.