0

I installed the Sitecore Connect for Content Hub 5.1 with Sitecore 10.3 XM. After installing the WDP package of CH in Sitecore and making the configuration changes in the connection string for DAM.ContentHub and DAM.SearchPage I get the following error:

enter image description here

I went through the link https://doc.sitecore.com/xp/en/developers/connect-for-ch/50/connect-for-content-hub/troubleshooting-scch.html where it is suggested for installing the 3.1.14 version of the Microsoft dependency injection with Sitecore.Kernel of version 13.0.0-r* by creating a new Class Library project and then deploy that class library in the bin of your Sitecore instance with the config patch as suggested in the Sitecore page, available on the link pasted.

Now my query is that, since my Sitecore instance is at 10.3, ideally I will have to refer to 10.3's Sitecore.kernel Dll in the class library project, which I checked is of 18.0.0 version. Now, I can't install the 3.1.14 version of the MS Dependency injection because Sitecore.kernel.dll version 18.0.0 uses 6.0.0 version of MS Dependency. If I degrade sitecore.kernel.dll to 13.0.0 to use 3.1.14 of MS dependency then my project will not run because it is based on 10.3 XM (i.e., 18.0.0 of sitecore.kernel.dll). Hence, it contradicts the solution provided by Sitecore.

So, do you have any other solution to tackle this DisposeAsync issue with Sitecore 10.3 XM and CH 5.1?

3
  • The article says the solution is for versions prior to 10.2. So probably you don't need to apply that solution to 10.3. Check if any of your projects in your code using older version of Microsoft.Exensions.DependencyInjection. Commented Oct 10, 2023 at 13:07
  • Try simply copying the 3.1.1.14 version of the DLL into your bin folder. Then add a binding redirect to your Web.config similar to the answer here: stackoverflow.com/questions/63001770/… then update to oldVersion="0.0.0.0-6.0.0.0" newVersion="3.1.1.14" Commented Oct 10, 2023 at 15:39
  • @DeanOBrien I tried the solution but now it says "Could not load type 'Microsoft.Extensions.DependencyInjection.ServiceCollection' from assembly 'Microsoft.Extensions.DependencyInjection.Abstractions, Version=3.1.14.0" Commented Oct 11, 2023 at 7:55

1 Answer 1

1

In my case after installing the Content Hub connector package the web.config was modified to refer to the 3.1.14.0 version of the Microsoft dependency injection DLLs but I changed the version back to the original 6.0.0.0 as following in the web.config

<dependentAssembly>
        <assemblyIdentity name="Microsoft.Extensions.DependencyInjection.Abstractions" publicKeyToken="adb9793829ddae60"/>
        <bindingRedirect oldVersion="0.0.0.0-6.0.0.0" newVersion="6.0.0.0"/>
        <codeBase version="6.0.0.0" href="bin/scch/Microsoft.Extensions.DependencyInjection.Abstractions.dll"/>
      </dependentAssembly>

And checked that the version of the DI DLLs is 6.0.0.0 now everything works fine.

UPDATE-1: After 4 months again I tried to set up the same scenario and got the same issue but this time a strange thing happened to fix this.

enter image description here

I added the new entry as shown in the red box, above the commented line then it worked but, after doing the web.config and connectionstring.config changes, again got the same issue. Now this time added the entry of the commented line and added the respective version's dll in the bin/scch folder and commented the previous line and un-commented the newly added commented line, and it again started working.

Whenever I make changes in the configs then yellow screens come and I have to do vice-versa by commenting the uncommented line and un-commenting the commented line with the dll file, of the specific version, update.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.