Comments (3)
Hi @adomina
Thanks for raising this issue. I have been able to run the Code-Gen with Sitecore 9 and Rainbow 2. You need to update some assembly references (as you have done already for Rainbow 2) and also add Microsoft.Extensions.DependencyInjection in version 1.0.0. Sitecore seems to depend on it starting in version 9.
I have added Microsoft.Extensions.DependencyInjection v1.0.0 via NuGet and then updated my configuration as follows:
<#@ template debug="false" hostspecific="true" language="C#" #>
<#@ 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.NoReferences.9.0.171002\lib\net462\Sitecore.Kernel.dll" #>
<#@ assembly name="$(SolutionDir)packages\Sitecore.Logging.NoReferences.9.0.171002\lib\net462\Sitecore.Logging.dll" #>
<#@ assembly name="$(SolutionDir)packages\Microsoft.Extensions.DependencyInjection.Abstractions.1.0.0\lib\netstandard1.0\Microsoft.Extensions.DependencyInjection.Abstractions.dll" #>
<#@ assembly name="$(SolutionDir)packages\Microsoft.Extensions.DependencyInjection.1.0.0\lib\netstandard1.1\Microsoft.Extensions.DependencyInjection.dll" #>
<#
// CONFIGURATION
var physicalFileStore = @"D:\inetpub\wwwroot\sc900\Data\Unicorn"; // the path to your serialisation items
var treeName = "Feature.Sample\\Templates"; // the name of the configuration you want to code-generate
var treePath = "/sitecore/templates/Sample"; // the matching path in Sitecore for the configuration
Please note that you might have to close and re-open Visual Studio or the project. T9 can be a little flaky.
Let me know how you go and I will update the project documentation,
from rainbowcodegeneration.
I have updated the Readme and also added example config for Sitecore 9 in v0.3 that was just released. Closing the issue, please comment/re-open if it is still a problem.
from rainbowcodegeneration.
Many thanks, it works now
from rainbowcodegeneration.
Related Issues (6)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rainbowcodegeneration.