question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

cacheResult renderTemplate code from quickstart does not compile in beta-2

See original GitHub issue

Describe the bug beta-1, the readme code to render a template worked

var cacheResult = engine.TemplateCache.RetrieveTemplate("templateKey");
if(cacheResult.Success)
{
    string result = await engine.RenderTemplateAsync(cacheResult.Template.TemplatePageFactory(), model);
}

in beta-2, this code no longer works as engine doesn’t contain a property TemplateCache

To Reproduce try to build this code using beta-2

Expected behavior Code should build

Information (please complete the following information):

  • OS: Windows 10x64
  • Platform: .NET Core 2.2
  • RazorLight version: 2.0-beta2
  • Visual Studio version: Visual Studio Community 16.3.10

Additional context I was able to adjust the quickstart code to compile and run by changing the broken line to:

var cacheResult = engine.Options.CachingProvider.RetrieveTemplate("templateKey");

But not sure if that still achieves the same goal of template re-use.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:13 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
jzabroskicommented, Dec 5, 2019

I’ll push beta3 this week with this fix, update some documentation, and include the s.nupkg for symbols so people can more easily debug.

1reaction
toddamscommented, Dec 5, 2019

Yup, I agree

Read more comments on GitHub >

github_iconTop Results From Across the Web

No results found

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found