Assembly error after upgrade (9 to 10)

Aden Tutton asked on August 3, 2018 10:42

Hi guys,

Just looking for a little help, I have done an upgrade from v9 to v10 and everything went smoothly but when I try to run the local instance of the project I get the following error

Could not load file or assembly 'CMS.Core, Version=9.0.0.0, Culture=neutral, PublicKeyToken=834b12a258f213f9' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)

I've tried many things such as deleting the IIS temp files but having no luck in getting the correct assemblies to be found. All the files in the /bin folder have been updated to v10 so I'm a little stuck

Many thanks!

Aden

Recent Answers


Suneel Jhangiani answered on August 3, 2018 14:10

If it is a WebApp project have you rebuilt it so it references the new Version 10 libraries?

0 votesVote for this answer Mark as a Correct answer

Peter Cranston answered on August 6, 2018 12:04

Have you made absolutely sure that there are no v9 DLLs left in the bin folder? Sometimes legacy files do hang around following an upgrade (add the product version column in windows explorer to check). You want to make sure that any DLLs in the format CMS.XXX which are version 9 have been deleted.

0 votesVote for this answer Mark as a Correct answer

Aden Tutton answered on August 6, 2018 12:11

@Suneel Jhangiani - The project builds fine in Visual Studio but unfortunately still the same result

@Peter Cranston - I have checked through the project and all of the DLLs have been updated to version 10 (including the one which causes the error)

0 votesVote for this answer Mark as a Correct answer

Peter Cranston answered on August 6, 2018 12:23

Just to be clear, it is not CMS.Core that is causing the error, it is another version 9 DLL that is referencing CMS.Core version 9 but cannot find it such as CMS.CKEditor.dll or CMS.ControlsXmlSerializers.dll. These are both DLLs that are no longer used in kentico 10 and should be removed by the upgrade but in some cases are not.

0 votesVote for this answer Mark as a Correct answer

Aden Tutton answered on August 6, 2018 12:26

@Peter Cranston - Ahhhh that makes sense the CMS.ControlsXmlSerializers.dll is still in there and on version 9.0.0.0! Do I have to remove it from the /Lib folder as well as the /bin folder?

0 votesVote for this answer Mark as a Correct answer

Peter Cranston answered on August 6, 2018 12:31

Yes, remove any occurrence or reference to it in the project.

0 votesVote for this answer Mark as a Correct answer

Aden Tutton answered on August 6, 2018 13:12

@Peter Cranston - Unfortunately removing the files from both the /Lib and /bin files stil gives the same error, would they be located anywhere else in the project perhaps?

0 votesVote for this answer Mark as a Correct answer

Suneel Jhangiani answered on August 7, 2018 01:27

Check the CMSDependencies folder

You could also try mapping the older version calls to the newer version and see if that helps you find the offending assembly - add the following to the configuration element in your web.config:

<runtime>
    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
        <dependentAssembly>
            <assemblyIdentity name="CMS.Core" culture="neutral" publicKeyToken="834b12a258f213f9" />
            <bindingRedirect oldVersion="0.0.0.0-9.0.0.0" newVersion="10.0.0.0" />
        </dependentAssembly>
    </assemblyBinding>
</runtime>
0 votesVote for this answer Mark as a Correct answer

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