example icon indicating copy to clipboard operation
example copied to clipboard

build.sh should use the .Net Core cli command first and fall back to mono in its absence

Open devnulljason opened this issue 6 years ago • 3 comments

With .Net Core being available on Linux and macOS systems without the need for mono to be present, as well as various Docker containers being provided by Microsoft (and others) that are utilizing .Net Core on Alpine without mono, the build.sh script should take these into account and set the dotnet command accordingly. This will allow greater portability and usability of the default script.

devnulljason avatar May 13 '20 17:05 devnulljason

The more I look at the build.sh script the more dismayed I am that it's not actually *nix friendly. There are a couple design decisions that raise some eyebrows, such as the aforementioned reliance on a command that hasn't been necessary for *nix .Net Core development for years and downloading the windows command-line Nuget, which will definitely not work in a *nix environment. I hope to have a PR later with a rework of the bash script that will address these issues and retain the current script's functionality.

devnulljason avatar May 13 '20 17:05 devnulljason

It's been on our radar to rewrite the bootstrappers for awhile, we've not decided on exact path yet. Currently many use them for Xamarin builds which require mono.

It's not unlikely .NET Global tool will be the recommended path forward, you can see an example of that in Cake's own repo https://github.com/cake-build/cake/blob/develop/build.sh

Cake 1.0 will change bootstrapping a bit and simplify acquiring process. Its possible that. NET Core tool manifest introduced in .NET Core 3.x will be the recommended way forward.

You can set an example if toolmanifest approach in this presentation https://youtu.be/ZeGMTuuEKxM

devlead avatar May 13 '20 18:05 devlead

This is great to hear. I've just started exploring this tool since it's what's being used on some newer projects at work and this example repo is the one I landed at since it's what's on the documentation on the website and where the VSCode extension pulls its bootstrapping script from. I'll take a look at the roadmap and see where I can contribute.

devnulljason avatar May 13 '20 19:05 devnulljason