1

We are upgrading from Sitecore 9.2 to Sitecore 10.2, earlier we used Unicorn and RainbowCodeGeneration, which used to work fine. During upgrade to Sitecore 10.2, we upgraded the Sitecore.Kernal version and below dlls

  • Sitecore.Kernel – 10.2
  • RainbowCodeGeneration - 0.3.0
  • Microsoft.Extensions.DependencyInjection.Abstractions - 3.1.14
  • Microsoft.Extensions.DependencyInjection - 3.1.14
  • Rainbow.Core - 2.1.4
  • Rainbow.Storage.Yaml - 2.1.4
  • RainbowCodeGeneration - 0.3.0

So now when we are trying to generate code using .tt file, it throws error(PFA):

Failing at:RainbowCodeGeneration.RainbowReader.GetTemplates(Host.ResolvePath(physicalFileStore), treeName, treePath); Attaching .tt file for the reference.

It seems that the version RainbowCodeGenaration refers is not supported by Sitecore.Kernal(10.2). So there seems an ambiguity between these versions.

Exception: Running transformation: System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.Extensions.DependencyInjection.Abstractions, Version=3.1.0.0, Culture=neutral, PublicKeyToken=' or one of its dependencies. The system cannot find the file specified.

So I want to know which version of Rainbow assemblies can support similar code generation feature with Sitecore 10.2 as I am getting exceptions

I could see a similar issue was raised for Sitecore 9.x but there is nothing mentioned about Sitecore 10.2

Should I open a ticket to git repository developer.

2
  • Yea, you need to take this to the author of RainbowCodeGeneration. github.com/heikof/RainbowCodeGeneration
    – Mark Cassidy
    Jun 28, 2022 at 11:56
  • I still feel my question is valid and should be kept open for discussion as many Sitecore developers may encounter this issue in near future, but long story short, I got an alternate to fix this issue that is to use Sitecore CLI with leprechaun, this combination helped me to re-generate similar model classes now. Please find below link for idea. gerhartmagdas.wordpress.com/2021/05/17/… Since question has been blocked now, so I have limit to share details about it now. Dec 5, 2022 at 18:16

0

Browse other questions tagged or ask your own question.