I've written a feature that deploys new columns along with a content type containing the columns. The feature is Site scoped and written in Visual Studio 2010 to deploy to SharePoint 2010.

When the feature is deployed the new columns and content type show up in the UI, however the content type is missing the new columns. I first suspected that the content type was being deployed first followed by the columns.

Update:

I followed Koen's blog post. His approach is to add the fields to the start of the content type's elements.xml. The steps in his post worked perfectly! However when I tried to follow the same approach with the content type I'm working on, the site columns were deployed correctly but still not the content type!

I've done a lot of testing and may be confused now about what's actually happening. Here is the complete elements.xml I'm using:

You should be able to deploy a site column and a content type in the same Feature just fine, as both as Site-scoped. I'm doing this without any problems.

Make sure in your Feature that the site column is 'before' the content type, since things get executed in the order they are presented to SharePoint. In the Feature Designer, there are 'Up' and 'Down' arrows for this purpose to the right of the right-hand pane - they're easily missed :)

Hmmm I can find them when working with the package but not the feature? In any case, I added the elements to the feature in the correct order and checked its manifest file to ensure the order was correct. Still no luck!
–
Alex AngasMay 23 '10 at 12:00

I like to separate my site columns from my site content type. And like Chris said, make sure the fields are provisioned before the content type. Just create a second element manifest and move your content type into that.