Quit iTunes
Open the iTunes Music folder, on a Mac this is by default in/Music/ and in Windows it....
Drag the file iTunes Music Library.xml to your desktop
Now relaunch iTunes
Just before doing anything go to File -> Library -> Import Playlist
Now navigate to your desktop to the “iTunes Music Library.xml” file that you placed there earlier and select it

Go into your home folder, then into the Music folder, and finally into the iTunes folder. Find a file called iTunes Music Library.xml and drag it out of that folder (to the desktop, or somewhere else that's convenient for you). Delete the file called iTunes Library.itl. Re-open iTunes and go to the File menu.