psfblair/fsharpbinding — pull request #4 by funnelweb (2012-07-08 23:37:30+00:00)
Title: fsproj portability: Make .fsproj from MonoDevelop (more) compatible with those from Visual Studio

This makes .fsproj from MonoDevelop more compatible with those from Visual Studio, and also respects and maintains the settings in .fsproj files that come from Visual Studio.

The names of quite a few .fsproj entries were "wrong"
- "GenerateDebugInfo" should be "DebugSymbols" + "DebugType"
- "OptimizeCode" should be "Optimize"
- "GenerateTailCalls" should be "Tailcalls"
- "DefinedSymbols" should be "DefineConstants"
- "CustomCommandLine" should be "OtherFlags"

and so on. It also fixes the defaults for a project created using the F# addin so that
- debug symbols generated in both Debug (full) and Release (pdbonly) mode
- tailcalls off in Debug mode (as in Visual Studio)
- DEBUG symbol defined in .fsproj file in debug mode
- Optimize off in release mode

This is done in CreateCompilationParameters just like the MonoDevelop C# bindings do it.

This change may break (or change the settings) for existing MonoDevelop-authored projects - the .fsproj files will need to be updated with the above renamings. Since there are not many MonoDevelop-authored projects in existence it is better to make this change early. I looked at adding logic to Parameters.fs to make it possible to read existing MonoDevelop-authored .fsproj but it isn't easy and would effectivelt perpetuate the non-standard .fsproj entries forever.