I wanted to create a custom site definition so that I could create custom site collections. After some research I discovered there was a lot of messy, manual XML work involved. So I found the SharePoint Solution Generator (SSG) on the Microsoft site (download). This is exactly what I was looking for!
The SSG will take a customized site and create a Visual Studio 2005 project with all of the code necessary to create a new site definition. It even has an automated solution deployment.
I installed it on a test system and ran the SSG. I hit next to create a new site definition and it came back after a few minutes with an out of memory error message. I found out the first thing it does is enumerate all of the sites on your web application and populate a tree view control. I had too many sites…
My easy solution to this problem (on a test server) was to remove all of the content databases that didn’t contain the site I wanted to use as a template for my site definition. This might work for some of you but I still had too many sites so I created a temporary content database and site collection. I then created a sub-site using the site template I needed. (Whatever works for you.)
Found out you can also just remove the content database that stores the root site collection for the web application.
Now I could select the sub-site I wanted to use for my site definition. I selected the site, selected the lists I wanted and clicked Finish. Now I get an error “No SharePoint Site exists at the specified URL”. With a little digging I found that the wizard doesn’t work with Basic authentication! I added Integrated Security to the site in IIS and ran the wizard again. That did the trick.
Now I just need to figure out why none of my customized lists and libraries are not showing on the Quick Launch by default. (The XML files have the property set to TRUE.)
Hope this helps someone…