I have this feature that I am trying to run in order to configure a site, this feature among other things creates pages based on content types, etc. The problem I am facing is that every time i am trying to enable the feature from code the site content type collection is always empty. I have tried:
- Include feature in a custom site definition
- Feature stapling to a OOB site
- Tried a Poling thread to keep checking ContentType collection count every 500ms - this throws an exception after some runs -
If I do:
web.ContentTypes.Count it allays returns zero even when
If I enable my feature manually all the content types are there as expected.
How do I go about solving this problem? Any ideas?