Lately I've been mucking about with the portal parts of Team System since we wanted to move our documents into SharePoint and gain all the benefits there.
We did however bump into a major issue that turned out to be a bug in the SharePoint templates in Team System. The bug is fixed in the upcomming release (TFS2008) in both template versions (WSS2.0 & WSS3.0).
The problem occurs when you delete certain document libraries from you portals, namely the security and requirements. This will corrupt the portal navigation (quicklaunch) and once you've ended up in a corrupted state you can not get any document libraries to appear on the quick launch.
The bug is related to some sort of hardcoding in the template concerning the security and requirements document libraries. You can test this by enabling "show on quicklaunch" in these document librareis. This will generate duplicates on the quicklaunch. And if you remove either of them the navigation breaks.
After some discussions with Microsoft support we came to the conclusion that if you delete the security or requirements document libraries (either through team explorer or through the portal), it seems that an orphaned element is left in the dbo.navnodes table of your SharePoint content database.
There is a way to remove these document libraries with out breaking the navigation. To do this you need to use FrontPage 2003 and connect to the site in question. Then open the file default.aspx and you will see the following section on the left.
Double click on either the security or requirements link and you will be presented with the "linkbar properties" dialogue. Then remove the link to the security and/or requirements document library from the quicklaunch.
When you have done this it's ok to remove the document libraries from any tool you choose.
If you like me have a trigger happy finger and don't like unused stuff and already have deleted the document libraries and are stuck with a broken portal there is a solution :).
NOTE THAT THIS IS NOT A SOLUTION SUPPORTED BY MICROSOFT!!! So you should know what you are doing when performing this recovery strategy and always make sure that you have a made a complete backup of both sharepoint databases before starting this procedure!!!
Step 1, Get the identity of the orphaned document library from the navigation nodes table.
SELECT DocId FROM dbo.navnodes
WHERE name = 'BrokenDocumentLibraryName' AND
SiteId IN (SELECT SiteId FROM dbo.Webs WHERE FullUrl = 'sites/TeamProjectName') AND
WebId IN (SELECT id FROM dbo.Webs WHERE FullUrl = 'sites/TeamProjectName')
Step 2, Verify that the document library actually is orphaned.
SELECT * FROM docs
WHERE Id = 'DocumentLibraryIdentity'
Step 3, Remove the orphaned document library from the navigation node table.
DELETE FROM dbo.navnodes
WHERE DocID = 'DocumentLibraryIdentity'