adoconnection / RazorEngineCore

.NET6 Razor Template Engine
MIT License
565 stars 84 forks source link

Running Strongly typed model produces error #109

Closed agdev closed 2 years ago

agdev commented 2 years ago

Hi,

I installed RazorEngineCore. and copy pasted Strongly typed model example in Console project with Targeted Framework: net6.0-windows IDE: Visual Studio Pro 2022 When I run it I am getting error: =====================Error======================= Unable to compile template: (28,69): error CS1031: Type expected (28,69): error CS1003: Syntax error, ',' expected (28,70): error CS1003: Syntax error, ',' expected (28,45): error CS0308: The non-generic type 'RazorEngineTemplateBase' cannot be used with type arguments (31,67): error CS0115: 'Template.ExecuteAsync()': no suitable method found to override (33,13): error CS0103: The name 'WriteLiteral' does not exist in the current context fcmmcb5y.2dj(5,2): error CS0103: The name 'Write' does not exist in the current context fcmmcb5y.2dj(5,8): error CS0103: The name 'Model' does not exist in the current context =====================End Error=============================

adoconnection commented 2 years ago

hi, please provide your console app code to reproduce