I recommend upgrading the CMS first by excluding any other projects in the solution so they don't generate build errors.
Check that the CMS is correctly referencing the Kentico DLLs, make sure the reference paths are to the lib folder one level above the CMS project. The CMS project shouldn't have any Kentico libraries NuGet references.
Run the upgrade via KIM (after backing everything up)
Delete the bin and obj folders then rebuild, the old DLLs can hang around here and cause you headaches.
Check your source control / documentation for destruction of any custom elements you added to the CMS.
I found some problematic binding redirects were added, these can be found on the project xml file or web.config. Compare them against a fresh install of Kentico 13 of the same version if you need to.
Once you have you CMS building and running ok, then re-include the other projects and update the Kentico Libraries to the same version as your CMS.
And follow the documentation as well although as previously mentioned I'd see it as a guideline because there are so many variables.