Bug 11509 - MonoDevelop Line endings policy being ignored
Summary: MonoDevelop Line endings policy being ignored
Alias: None
Product: Xamarin Studio
Classification: Desktop
Component: General ()
Version: 2.8.2
Hardware: PC Windows
: --- normal
Target Milestone: ---
Assignee: Bugzilla
Depends on:
Reported: 2013-04-01 15:30 UTC by Jason King
Modified: 2013-04-01 18:27 UTC (History)
1 user (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 on Developer Community or GitHub 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 Jason King 2013-04-01 15:30:34 UTC
I'm trying to use Monodevelop for unityscript and C# development (I've installed Unity 4.1 and Monodevelop 2.8.2). But it keeps asking me to change my line endings to LF instead of CRLF.

I'm getting "The file ... has line endings which differ from the policy settings - Do you wan to convert the line endings?" For which I respond "Keep changes".  That information appears to be stored while MonoDevelop is running, but the next time I load up MonoDevelop and make a change to the same file it asks me again.

I've made numerous attempts to change the Tools->Options->Source Code->Code Formatting->Text file/C# source code->Line endings to either Native or Microsoft Windows, but no matter what I do it attempts to save the file as LF even though the options state (after restart) that the line endings setting did set as Microsoft Windows (or Native - I'm on a PC).

Please advise.
Comment 1 Mikayla Hutchinson [MSFT] 2013-04-01 16:18:44 UTC
MonoDevelop 2.8.2 is > 18 months old and no longer supported. Current is 4.0 (Xamarin Studio).

That said, your problem may be that policies are per solution (Solution Options) - user preferences (Tools->Options) are only used for new solutions. I have seen reports of Unity changing the solution polices when syncing, so watch out for that.
Comment 2 Jason King 2013-04-01 16:44:16 UTC
Hi Michael,

Thanks for the info (I did not know that MonoDevelop was an unsupported), but this problem is occurring outside of Unity... meaning all I have to do is shutdown and reload monodevelop to get the problem to occur.  Also, my settings are not changing (back) when shutting down and reloading monodevelop - they show Native or Window if those were the last settings.  If you have any other ideas, please let me know.

In any case, I'm just looking for a full solution so my next question is obvious... 

What do I need to do to get a great IDE (one that isn't pinging me about line endings and allows for unityscript and C# development) that also allows debugging of Unity?  Is that possible if I upgrade to Xamarin Studio 4.0?  I'm quite willing to purchase the Indie version if that's all it took.  I'd even consider the Business version if it allowed editing and debugging within Visual Studio.

Please advise.
Comment 3 Mikayla Hutchinson [MSFT] 2013-04-01 18:27:20 UTC
Xamarin Studio is Xamarin's branded version of MonoDevelop 4.0. The IDE is free, no need to buy anything (it's the Xamarin iOS/Android/Mac developer tools that have paid versions). I know a lot of developers are using Xamarin Studio with Unity already - the integration is about as good as you get OOTB with MS Visual Studio, i.e. C# editing/refactoring etc but no debugging or UnityScript.

Unity debugging and UnityScript support in MD/XS 4.0 would need someone to port Unity's addins from 2.8.2 to 4.0 (they're open-source (on Unity's github). Unfortunately no-one's done that yet.
You might try UnityVS, which adds adds Unity debugging and UnityScript support to MS Visual Studio.