Skip to content

The name 'inherits' does not exist in the current context #603

@NameOfTheDragon

Description

@NameOfTheDragon

I'm trying to compile templates that inherit from TemplateBase and TemplateBase<T>, and I'm getting the following error:

 More details about the error:
 - error: (15, 18) The name 'inherits' does not exist in the current context
Temporary files of the compilation can be found in (please delete the folder): C:\Users\Tim.Long\AppData\Local\Temp\RazorEngine_xtuhlpzp.f5j
The template we tried to compile is: 
------------- START -----------
@using RazorEngine.Templating
@inherits TemplateBase
<p>Hello world</p>

------------- END -----------

As you can see, the template is pretty minimal. I'm using the EmbeddedResourceTemplateManager in case that's relevant. This seems pretty broken so I'm wondering if there is just something I've missed about how to set things up?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions