I am finding it hard to identify an error that occurs when executing Razor template building blocks. The error message is as follows:
Engine: Error in Engine.Transform 'string' does not contain a definition for 'Title' at CallSite.Target(Closure , CallSite , Object ) at Tridion.Extensions.Mediators.Razor .Templating.Rzr9efd1fb529654b78b3f9321ba71e33b4Template.Execute() at Tridion.Extensions.Mediators.Razor.RazorHandler .CompileAndExecute(DateTime revisionDate, Engine engine, Package package) at Tridion.Extensions.Mediators.Razor.RazorMediator .Transform(Engine engine, Template template, Package package)
This occurs at render time and not when the handler first executes a compile on saving the TBB. We've looked at the templating code, and have not been able to find an example of dereferencing a Title property on anything that looks like a string. This suggests that the issue is with a dynamically typed variable.
So far I have attempted to identify the problematic code by selective deleting/commenting and by using @Debug() statements, all without success. Any suggestions for alternative debugging strategies would be welcome. Has anyone else experienced something similar?