Technical Level: Intermediate Fix the most common iTunes/Windows Phone sync issues by clearing out bad iTunes settings.
Update May 9 2016: As of iTunes 12.2, the XML file that the Windows Phone app uses is no longer generated by default. However, it can turned back on by following the instructions in this Apple support article.
Most sync issues with iTunes are the result of a certain bad file from iTunes. It’s a file that is safe to delete, so the best thing to do is to delete it and let iTunes make a fresh copy of it!
First, be sure to have disconnected your phone from your computer, have closed the Windows Phone for desktop app and have closed iTunes!
Remove bad iTunes files
1. Delete the iTunes library.xml file in the iTunes folder. The iTunes folder is found in your Music folder by default.
a. Sometimes, you may also find a file called iTunes Music.xml. Delete this too.
**WARNING**: There are two very similar files in the iTunes folder: iTunes Library.itl and iTunes Library.xml. Sometimes, the "other" file does not have the .itl file extension. Make sure you DO NOT DELETE the .itl file. ONLY delete the XML file. If you can't see any file extensions, make sure they're on for Explorer.
Reset the Windows Phone App for desktop
1. Now we must find the settings files for the Windows Phone app and delete them
a. For Windows 7, open the Start Menu, type %localappdata%\Microsoft and press Enter.
b. For Windows 8, open the Search Charm, type %localappdata%\Microsoft and press Enter.
2. Find the folder called Windows Phone and delete it.
Regenerate your settings
1. Now, open iTunes and give iTunes up to half an hour to fully recreate the XML file. The larger your iTunes library is, the longer it will take to recreate this file. Usually, half an hour is a safe bet.
2. Now open the Windows Phone App for desktop, setup a sync relationship with your phone and try syncing again. You should have no more iTunes syncing errors!