Cake: Cake when Visual Studio Mac is installed == boom (due to bundling Mono.CSharp)

Created on 18 Nov 2016  路  9Comments  路  Source: cake-build/cake

See discussion over at https://twitter.com/GeoffreyHuntley/status/799393862846324736

Repro:

Upstream change that triggered this behaviour:

https://github.com/mono/mono/commit/5da8cfe05df331723584997bb9bbc6ac961c12d4

Most helpful comment

We decided to implement a workaround that would make this scenario not break:
https://github.com/mono/mono/commit/26c17a5b0f2c043a4bbccce2861b815492ad3aa2

It will be available in Mono 4.8.0.383 and later.

All 9 comments

I'll talk to a few people tomorrow, but as it is right now there's a coupling between Mono.CSharp.dll and Microsoft.CSharp.dll on Mono so mixing and matching isn't going to work (or only if you're lucky).

To be clear: this has nothing to do with VS for Mac, it's rather in the Mono 4.8 that comes with it.

@ghuntley @akoeplinger We are willing to make changes to make this work for you. Suggestions are very welcome (ping @cake-build/team)

Is 4.8 RTM? Does Roslyn scripting work with 4.8? If so perhaps finally time to drop Mono scripting and unify around one engine.

@devlead Excellent thinking. That would solve a lot of other problems as well.

Mono 4.8 is currently in the alpha channel and will ship sometime later this year. If Roslyn scripting works then that'd be a good solution, though we did make a lot of stability fixes in Mono master as part of our move to Roslyn which is currently a work in progress (so those fixes won't show up in 4.8, whether that impacts you or not is hard to say).

We discussed a few workarounds that might work for you:

  • add <probing> to app.config and move Mono.CSharp.dll into a subdirectory, it should then fail when you use a backslash in the probing path on Unix and load the version from the GAC.
  • ILMerge Mono.CSharp.dll
  • Somehow change the file+assembly name, e.g. by ildasm and ilasm it
  • Compile your own version of Mono.CSharp.dll e.g. Mono.CSharp.Private.dll
  • Bundle mcs.exe and reference that. Mono.CSharp.dll is basically the mcs.exe source code in .dll form: https://github.com/mono/mono/blob/master/mcs/class/Mono.CSharp/Mono.CSharp.dll.sources.

It all boils down to getting rid of Mono.CSharp.dll 馃槃

We decided to implement a workaround that would make this scenario not break:
https://github.com/mono/mono/commit/26c17a5b0f2c043a4bbccce2861b815492ad3aa2

It will be available in Mono 4.8.0.383 and later.

Ah cool, thanks for getting back to us @akoeplinger 馃憤

Closing this out due to age as the RTM ships with the version that includes the fix. Did not test/verify resolution.

image

Was this page helpful?
0 / 5 - 0 ratings