If you ever tried to publish one or more pages with your site definition (by onet.xml), you see in Visual Studio (with the SharePoint XSD schemas selected) only one valid value for the “Level” attribute which is “Draft”:
But for this attribute you can choose between every value of the SPFileLevel enum. So for publishing the page automatically, set the Level to “Published”. Thats it.
If you already know how to enable XSD schema validation and IntelliSense support stop reading here.
Enable Schema Validation:
- Open your xml file, e.g. onet.xml (works with all SharePoint related xml files)
- In the property pane, click the ellipsis next to the “Schemas” property
- Add the wss.xsd. This file is located in the 12\Template\XML directory
- Now add the following xml Namespace attribute to the root element (here Project in onet.xml):
Now you should have IntelliSense and schema validation enabled.