Bug 8927 - CodeDom doesn't handle snippets correctly, breaks Razor
Summary: CodeDom doesn't handle snippets correctly, breaks Razor
Alias: None
Product: Class Libraries
Classification: Mono
Component: System ()
Version: master
Hardware: PC Mac OS
: --- normal
Target Milestone: Untriaged
Assignee: Bugzilla
Depends on:
Reported: 2012-12-13 18:28 UTC by Mikayla Hutchinson [MSFT]
Modified: 2012-12-15 06:48 UTC (History)
2 users (show)

Is this bug a regression?: ---
Last known good build:

Demonstrates broken code generation on Mono. (828 bytes, application/octet-stream)
2012-12-13 18:28 UTC, Mikayla Hutchinson [MSFT]

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.

Please create a new report on GitHub or Developer Community with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:

Description Mikayla Hutchinson [MSFT] 2012-12-13 18:28:52 UTC
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.
Comment 1 Marek Safar 2012-12-15 06:48:20 UTC
Fixed in master