tags:

views:

281

answers:

4

I've created a content type on my local dev server, how can I package this content type, so I can deploy it professionally to live installations?

A: 

I would suggest you to look at the WSP Builder. It will help you a lot when creating SharePoint WSP solutions.

Magnus Johansson
WSP Builder is great, but still wondering how I can get the content type - out of the local environment and into a usable xml form, so I can reuse this content type in a feature. any ideas?
JL
WSPBuilder gets you started with a blank feature that can take a content type, but isn't able to extract one (but I can't bring myself to downvote an answer promoting it!).
Alex Angas
@Alex, yes. What I was getting after was to use WSP Builder during the development phase of the content type.
Magnus Johansson
A: 

I came across this , http://moss2k7ctypesviewer.codeplex.com

JL
Don't use this, it might look good, but the XML it produces does not validate, and is "rubbish". Rather use Petr Jakobsens suggestion, because the xml that gets produced, can be reused in a wsp package.
JL
+4  A: 

An option is AC's WCM Custom Commands for STSADM.EXE which adds two commands which is relevant here:

  • GenSiteColumnsXml
  • GenContentTypesXml

These allow you to get the XML for Site columns and content types base on ones existing in a site

Per Jakobsen
+1 AC's stsadm commands are awesome, suggest you look at http://stsadm.blogspot.com/ too!
Colin
...or if you prefer a Windows UI: http://blog.mastykarz.nl/go/imtechfieldsexplorer. It uses the same core as AC's STSADM commands.
Waldek Mastykarz - MOSS MVP
A: 

SPSource is an open source project that can reverse-engineer quite a few SharePoint artifacts and is actively supported by knowledgeable SharePointers such as Jeremy Thake and Rich Finn. There is a bit of set-up time required however.

There's also SharePoint Solution Generator from the Visual Studio Extensions for WSS (although I would use SPSource over this any day).

Note that both of these options are much more comprehensive than what you've asked for and designed to extract the artifacts from an entire SharePoint site. So if you just want the content types go with Per Jakobsen's answer.

Alex Angas
tried SPSource, but its not intuitive enough. OOB, it gives errors, and it wan'ts a length parameter for something, but I can't figure out for what.
JL
I never did anything serious with SPSource b/c it took too much time to do things 'its way'. Having said that they may be able to fix your issue if you log it http://spsource.codeplex.com/WorkItem/List.aspx
Alex Angas