toddams / RazorLight

Template engine based on Microsoft's Razor parsing engine for .NET Core
Apache License 2.0
1.5k stars 259 forks source link

Project can not find template with key #516

Closed MikeOtown closed 1 year ago

MikeOtown commented 1 year ago

.Net 6.0

When I call engine.CompileRenderAsync() I'm getting

TemplateNotFoundException: Project can not find template with key XXX

However,

typeof(myclass).Assembly.GetManifestResourceNames().Where(kn => kn == "XXX").First()

returns the Resource Name

jzabroski commented 1 year ago

Are you using embedded resource project or filesystem project or something else?

MikeOtown commented 1 year ago

Hi - It's been a while since I worked on this, but I think it was a Class Library Project with embedded resources. However, I'm no longer using RazorLight so can't really work on this issue at this time.

jzabroski commented 1 year ago

OK, I will close this issue. Thanks for your fast follow up.