Created attachment 3094 [details]
Demonstrates broken code generation on Mono.
The C# CodeDOM provider does not ensure that a CodeSnippetTypeMember and a CodeMemberMethod are separated when CodeGeneratorOptions.BlankLinesBetweenMembers=false.
This breaks Razor because it generates this exact pattern.
The attached sample demonstrates this. It works on .NET but generates broken code on Mono.
Fixed in master