Render Failed for component AFP.Content.Components.ContentPlaceHolder Parsing error occurred in template 'Page-70-Region-main' -> Errors while compiling a Template.
Please try the following to solve the situation:
* If the problem is about missing/invalid references or multiple defines either try to load
the missing references manually (in the compiling appdomain!) or
Specify your references manually by providing your own IReferenceResolver implementation.
See https://antaris.github.io/RazorEngine/ReferenceResolver.html for details.
Currently all references have to be available as files!
* If you get 'class' does not contain a definition for 'member':
try another modelType (for example 'null' to make the model dynamic).
NOTE: You CANNOT use typeof(dynamic) to make the model dynamic!
Or try to use static instead of anonymous/dynamic types.
More details about the error:
- error: (25, 7) Operator '==' cannot be applied to operands of type 'method group' and 'int'
Temporary files of the compilation can be found in (please delete the folder): C:\WINDOWS\TEMP\RazorEngine_14v1tj03.0tu
The template we tried to compile is:
------------- START -----------
@if ( Model.Count == 0 ){
No news articles matching your criteria could be found
}
------------- END -----------
The generated source code is:
------------- START -----------
//------------------------------------------------------------------------------
//
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
//
//------------------------------------------------------------------------------
namespace CompiledRazorTemplates.Dynamic {
using System;
using System.Collections.Generic;
using System.Linq;
public class RazorEngine_d7d517856b0e44c4bb0371fecc4009a5 : Content.RazorEngine37.AHPRazorTemplateBase {
public RazorEngine_d7d517856b0e44c4bb0371fecc4009a5() {
}
public override void Execute() {
if ( Model.Count == 0 ){
WriteLiteral("
\n
\n
\n No news articles matching your criteria could be found\n
\n " +
"
\n
\n
\n Please adjust your search criteria, and try again\n
}
------------- END -----------
The generated source code is:
------------- START -----------
//------------------------------------------------------------------------------
//
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
//
//------------------------------------------------------------------------------
namespace CompiledRazorTemplates.Dynamic {
using System;
using System.Collections.Generic;
using System.Linq;
public class RazorEngine_d7d517856b0e44c4bb0371fecc4009a5 : Content.RazorEngine37.AHPRazorTemplateBase {
public RazorEngine_d7d517856b0e44c4bb0371fecc4009a5() {
}
public override void Execute() {
if ( Model.Count == 0 ){
WriteLiteral("
\n
\n
\n No news articles matching your criteria could be found\n
\n " +
"
\n
\n
\n Please adjust your search criteria, and try again\n