Bug 46112 - line break type of designer.cs file is always changed to CRLF by iOS Designer
Summary: line break type of designer.cs file is always changed to CRLF by iOS Designer
Status: RESOLVED INVALID
Alias: None
Product: Visual Studio Extensions
Classification: Xamarin
Component: iOS Designer ()
Version: 4.2.0 (C8)
Hardware: PC Mac OS
: --- normal
Target Milestone: ---
Assignee: Bugzilla
URL:
: 44471 ()
Depends on:
Blocks:
 
Reported: 2016-10-28 08:24 UTC by Manabu Nakazawa
Modified: 2016-11-15 20:30 UTC (History)
5 users (show)

Tags:
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 on 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:
Status:
RESOLVED INVALID

Description Manabu Nakazawa 2016-10-28 08:24:22 UTC
1. Create a new solution for iOS's Single View App
   At this time, line break type of ViewController.designer.cs is  LF)
2. Open Main.storyboard and change it to change ViewController.designer.cs
3. See ViewController.designer.cs, its line break type changed to CRLF

I couldn't avoid this behavior even when I changed the code formatting setting to "Unix / Mac" form "Native".
Comment 1 Manabu Nakazawa 2016-10-28 09:48:15 UTC
P.S.
It's very annoying because my .gitconfig has "safecrlf = true".
Comment 2 Vinicius Jarina 2016-11-14 21:33:39 UTC
Hello Manabu

This is the correct behavior.

The .designer.cs code should be a read-only code, and will be always (re)generated by the designer.

We can't use the user settings, since this could cause two different machines to generate two different .designer.cs files.

Image you have the line end as CR and other person as CRLF, then this would cause the entire .designer.cs to be different. 

So the .desiger.cs is always generate equal, regardless the user formatting setting.
Comment 3 Manabu Nakazawa 2016-11-15 00:51:37 UTC
Thanks Vinicius!

I see.
So should I add "*.designer.cs" to my .gitignore?
Comment 4 Vinicius Jarina 2016-11-15 20:28:40 UTC
*** Bug 44471 has been marked as a duplicate of this bug. ***
Comment 5 Vinicius Jarina 2016-11-15 20:30:24 UTC
No because you will still need to push the .designer.cs changes :-)

The idea is no matter who changed the storyboard files, the .designer.cs will have the same output.