I have Mono 3.3.0 running on my Linux box. I am trying to use RazorEngine 3.3.0 (from NuGet).
Unfortunately it now throws this exception
System.Exception: Unable to compile template. The predefined type
System.Collections.Generic.IReadOnlyList' is defined multiple times. Using definition from
mscorlib.dll'
However the code works just fine on my Windows machine. Am I missing something obvious, or does this simply not work on Mono?
[Edit]
I just found this information in the "Errors" property of the exception.
{'Line': '0', 'Column': '0', 'ErrorNumber': 'CS1685', 'IsWarning': 'True', 'ErrorText': 'The predefined type
System.Collections.Generic.IReadOnlyList' is defined multiple times. Using definition from
mscorlib.dll'', 'Filename': ''} {'Line': '0', 'Column': '0', 'ErrorNumber': '', 'IsWarning': 'False', 'ErrorText': '/usr/lib/mono/4.5/mscorlib.dll (Location of the symbol related to previous warning)', 'Filename': ''} {'Line': '0', 'Column': '0', 'ErrorNumber': '', 'IsWarning': 'False', 'ErrorText': '/usr/lib/mono/gac/fastcgi-mono-server4/3.0.0.0_0738eb9f132ed756/fastcgi-mono-server4.exe (Location of the symbol related to previous warning)', 'Filename': ''} {'Line': '0', 'Column': '0', 'ErrorNumber': 'CS1685', 'IsWarning': 'True', 'ErrorText': 'The predefined typeSystem.Collections.Generic.IReadOnlyCollection' is defined multiple times. Using definition from
mscorlib.dll'', 'Filename': ''} {'Line': '0', 'Column': '0', 'ErrorNumber': '', 'IsWarning': 'False', 'ErrorText': '/usr/lib/mono/4.5/mscorlib.dll (Location of the symbol related to previous warning)', 'Filename': ''} {'Line': '0', 'Column': '0', 'ErrorNumber': '', 'IsWarning': 'False', 'ErrorText': '/usr/lib/mono/gac/fastcgi-mono-server4/3.0.0.0_0738eb9f132ed756/fastcgi-mono-server4.exe (Location of the symbol related to previous warning)', 'Filename': ''}
IReadOnlyList
. - Robert Harvey