Question:

After upgrade from 2009 to 2013 the .net templates dont work

Grayson: 2 weeks ago

After upgrading system from 2009 to 2013 SP1, the existing .net templates built with Tridion Content management dll 2009 and .net framework 3.5 are not executing (rendering fails)

When we run from template builder it gives follow error.

Debugging was started in process 'TcmTemplateDebugHost' with id 5396 Cannot find template class '-=NETASSEMBLY--.Templating.BuildingBlocks.DCPItem' in template assembly at Tridion.ContentManager.Templating.Assembly.AssemblyCache.GetTemplateType(Assembly templateAssembly, String className) at Tridion.ContentManager.Templating.Assembly.AssemblyCache.CachedAssemblyInfo.GetTemplate(String className) at Tridion.ContentManager.Templating.Assembly.AssemblyCache.GetCachedTemplateProcessor(String assemblyKey, String className) at Tridion.ContentManager.Templating.Assembly.AssemblyMediator.Transform(Engine engine, Template template, Package package) at Tridion.ContentManager.Templating.Assembly.CSharpSourceCodeMediator.RunTemplate(Engine engine, Package package, String templateUri, String className) at Tridion.Templating.CSharpTemplate.CSharpSourceTemplate.Transform(Engine __engine, Package __package) at Tridion.ContentManager.Templating.Assembly.CSharpSourceCodeMediator.Transform(Engine engine, Template template, Package package) at Tridion.ContentManager.Templating.Engine.ExecuteTemplate(Template template, Package package) at Tridion.ContentManager.Templating.Engine.InvokeTemplate(Package package, TemplateInvocation templateInvocation, Template template)
at Tridion.ContentManager.Templating.Compound.CompoundTemplateMediator.Transform(Engine engine, Template templateToTransform, Package package) at Tridion.ContentManager.Templating.Engine.ExecuteTemplate(Template template, Package package) at Tridion.ContentManager.Templating.Engine.InvokeTemplate(Package package, TemplateInvocation templateInvocation, Template template)
at Tridion.ContentManager.Templating.Engine.TransformItem(Template template, IdentifiableObject itemToRender) at Tridion.ContentManager.Templating.Debugging.DebuggingEngine.Run()
at Tridion.ContentManager.Templating.Debugging.DebugSession.Run()

Apart from that when we try to rebuild these old template using Tridion 2013 Content management dll and .net framework 4, it gives same error.

Later, there is one base tbb project, which we compilied again using Tridion 2013 Content management dll and .net framework 4 and now when we try to upload using TcmUploadAssembly it gives following error :

Error: Unable to load template assembly types Could not load file or assembly '--Base-TBB-Project--, Version=1.0.0.0, Cult ure=neutral, PublicKeyToken=1618c1322676f821' or one of its dependencies. The sy stem cannot find the file specified.

Has anyone faced similar issues before?

Answer:
Brielle: 2 weeks ago

You need to ensure following:

  • All the projects referenced in you TBB directly or indirectly should be re-build using latest Tridion Content Manager Dlls comes with 2013 - Which I guess you have already done as it seems your peoject is building up
  • The error message while uploading the TBB is self explanatory that one of the dependencies which means a DLL which either referenced directly or indirectly through some other DLL is not referenced correctly
  • It might also happen that there is stale reference to a DLL which is indeed not being used in the project at all - check the reference section of each and every project referenced in TBB and see if there is an un-referenced link of a DLL

I hope it helps