Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Sitecore TDS Code generation Error

I am trying to generate code from TDS code Generation by following GlassTutorial24 TDS version: 5.1.0.3, visual studio 2012.

The generated class only has "ErrorGeneratingOutput".

My project properties as below: TDS Project Properties

Edit 1:

Error while building:

Error 1 Compiling transformation: Metadata file 'HedgehogDevelopment.CodeGeneration.Extensions.dll' could not be found xxx.TDS.Master\Code Generation Templates\glassv3header.tt

Error 2 Compiling transformation: Invalid token 'this' in class, struct, or interface member declaration xxx.TDS.Master\Code Generation Templates\GlassV3Item.tt

Error 3 Compiling transformation: Method must have a return type xxx.TDS.Master\Code Generation Templates\GlassV3Item.tt

Error 4 Compiling transformation: Type expected xxx.TDS.Master\Code Generation Templates\GlassV3Item.tt

like image 397
Dheeraj Palagiri Avatar asked Feb 10 '23 16:02

Dheeraj Palagiri


1 Answers

Unfortunately the tutorial was out of date and need to be updated to the new code generation templates.

You need to use the files from Hedgehogs Repository: https://github.com/HedgehogDevelopment/tds-codegen/tree/master/Sitecore.Master/Code%20Generation%20Templates

You also need the following files:

  • Helpers.tt
  • GlassV3Header.tt
  • GlassV3Item.tt
  • GeneralExtensions.tt
  • Inflector.tt
  • StringExtensions.tt

The tutorial has now been updated as well:

http://www.glass.lu/Mapper/Sc/Tutorials/Tutorial24.aspx

like image 156
Michael Edwards Avatar answered Feb 15 '23 11:02

Michael Edwards