Calling convention must be VarArgs exception thrown for properties on generic classes

Found in

EPiServer.CMS.Core 11.18.0

Fixed in

EPiServer.CMS.Core 11.20.1

Created

Oct 06, 2020

Updated

Oct 27, 2020

Area

CMS Core

State

Closed, Fixed and tested


Description

ContentModelILCompiler throws an exception if an interceptable property is declared on a generic class.
Example: 

public class Content : BaseContent<int> { }
public abstract class BaseContent<TModel> : ContentData
{     public virtual bool Boolean \{ get; set; }
}

 
The thrown exception is an InvalidOperationException: "Calling convention must be VarArgs."