The solution file has two projects named "CMS"

Max De Los Reyes asked on November 7, 2022 20:47

Currently trying to upgrade Kentico 10 to 11. Getting this error when running the Upgrade Utility.

The single answer to the previous thread involved ensuring that the base files have not been moved. As far as I can tell, this is true of my project.

Upon getting this error, I opened WebSite.sln and found that there were two projects named CMS, one unable to load and one that is the original project (there remains, however, only one CMS folder when I dig into the project files). I removed the CMS project that was unable to load (leaving the original one) from the solution and tried rerunning the Upgrade Utility. I was prompted with the same error, and found that the CMS project that I had removed was regenerated.

It would seem to me that the program is generating a new CMS project, then throwing the exception upon finding two. Could someone correct me if I'm wrong, and/or provide some general advice? Much appreciated.

Attempted fixes:

  • Removing problematic project from solution
    • Same error
  • Running the utility on the CMS folder instead of the main directory (its parent, what I was originally running it on)
    • Same error
  • Renaming the CMS folder
    • "The selected folder is missing a vital Kentico component", cannot run tool
  • Removing the CMS folder
    • Same as above

Correct Answer

Juraj Ondrus answered on November 8, 2022 09:08

In the past when I have seen this error it was caused by the difference in the project GUIDs - maybe you solution originates from a very old Kentico version or the GUIDs were changed in the past for some reason. When you open the .sln file in a text editor, the default "CMS" project should have the GUIDs like this:

Project("{E24C65DC-7377-472B-9ABA-BC803B73C61A}") = "CMS", "CMS\", "{420F4FED-2F28-4BE5-8CEA-9A6B9A57558B}"

the "LIB" project:

Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Lib", "Lib", "{60BF950D-9BE2-47E7-B905-3694E1BA33DC}"

So, the options you have right now are:

  • adjust your .sln file and use the GUIDs from the default SLN file or,
  • install a fresh Kentico 10 instance and use the default .sln file or,
  • follow the manual upgrading steps and copy over the new files.
1 votesVote for this answer Unmark Correct answer

   Please, sign in to be able to submit a new answer.