您能否就下列问题提出建议?
我安装了Sitecore 9,Unicorn和Rainbow,项目已同步。 但是,当我尝试将最新的RainbowCodeGeneration添加到我的项目中时, 设置默认的.tt模板后,它会失败,但出现异常:
Running transformation: System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.Extensions.DependencyInjection.Abstractions, Version=1.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60' or one of its dependencies. The system cannot find the file specified.
在以下行:
var templates = RainbowCodeGeneration.RainbowReader.GetTemplates(physicalFileStore, treeName, treePath);
我使用以下配置:
<#@ template debug="true" hostspecific="true"#>
<#@ output extension=".cs" #>
<#@ assembly name="System.Core" #>
<# // NOTE - Reference your NuGet packages for Rainbow and RainbowCodeGeneration here #>
<#@ assembly name="$(SolutionDir)packages\Rainbow.Core.2.0.0\lib\net452\Rainbow.dll" #>
<#@ assembly name="$(SolutionDir)packages\Rainbow.Storage.Yaml.2.0.0\lib\net452\Rainbow.Storage.Yaml.dll" #>
<#@ assembly name="$(SolutionDir)packages\RainbowCodeGeneration.0.2.0\lib\net452\RainbowCodeGeneration.dll" #>
<# // NOTE - Reference your Sitecore.Kernel.dll and Sitecore.Logging.dll here #>
<#@ assembly name="$(SolutionDir)\packages\Sitecore.Kernel.9.0.171002\lib\net462\Sitecore.Kernel.dll" #>
<#@ assembly name="$(SolutionDir)\packages\Sitecore.Logging.9.0.171002\lib\net462\Sitecore.Logging.dll" #>
答案 0 :(得分:0)
我在RainbowCodeGeneration项目github上发布此问题后,创建了0.3版本。它现在支持Sitecore 9.