Bug 2237 - GTK designer generated code does not respect line ending policy on windows
Summary: GTK designer generated code does not respect line ending policy on windows
Alias: None
Product: Xamarin Studio
Classification: Desktop
Component: GTK# Designer ()
Version: 2.8.2
Hardware: PC Windows
: Low normal
Target Milestone: ---
Assignee: Lluis Sanchez
Depends on:
Reported: 2011-11-28 18:35 UTC by Daniel Hughes
Modified: 2013-03-21 06:49 UTC (History)
3 users (show)

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

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 for Bug 2237 on Developer Community or GitHub if you have new information to add and do not yet see a matching new report.

If the latest results still closely match this report, you can use the original description:

  • Export the original title and description: Developer Community HTML or GitHub Markdown
  • Copy the title and description into the new report. Adjust them to be up-to-date if needed.
  • Add your new information.

In special cases on GitHub you might also want the comments: GitHub Markdown with public comments

Related Links:

Description Daniel Hughes 2011-11-28 18:35:48 UTC
I have a project using GTK sharp.

The project is set to Inherited Policy for c# source code

The solution is set to Use default settings from 'Text file'

The solution Text file is set to Unix line endings.

The works for editing .cs files directly however the generated User Interface code is created with windows line endings.

Every time I build using monodevelop for windows the line endings for the generated code is converted to windows line endings.

This means I must manually exclude those changes from the commit. The Generated GTK# code should respect the line ending policy.
Comment 1 Mike Krüger 2012-04-13 05:54:33 UTC
Comment 2 Daniel Hughes 2012-08-03 20:42:18 UTC
Reopened as this is still broken in (released June 18, 2012) after this was supposedly fixed.
Comment 3 Mike Krüger 2012-10-19 02:02:15 UTC
@Lluis: I think it's something with the policies.

I created a new gtk project & set the line ending to windows.

In GuiBuilderService - line 548 I added:

 Console.WriteLine ("eol:" + pol.EolMarker + " for project "+project.Name);

And the pol.EolMarker was always set to Native - even if it was set to windows in the options. The project name was correct.
Comment 4 Daniel Hughes 2013-03-21 06:49:05 UTC
I have retested in 4.0.2 (build 18) Xamarin Studio branded on windows and the problem still exists. The policy is unix line endings but the generated GTK code uses windows line endings. 

This has magical ability to turn nearly every single cross platform commit into a conflict. Which as you imagine is very irritating.