fsprojects / ProjectScaffold

A prototypical .NET solution (file system layout and tooling), recommended for F# projects
http://fsprojects.github.io/ProjectScaffold
The Unlicense
516 stars 153 forks source link

Check that F# is installed in init.fsx #286

Closed rmunn closed 7 years ago

rmunn commented 7 years ago

If F# is not installed (say a Linux user has installed the mono-complete package, mistakenly thinking that F# was included in mono-complete), the error message that the user will see when he runs build.sh or build.cmd is "Target named 'Rebuild' not found in the project". Instead, we should check (once) in init.fsx to make sure that F# is properly installed, and give a clearer error message if it isn't.

This should fix #253.

rmunn commented 7 years ago

Note that https://github.com/Microsoft/msbuild/issues/1533 might be relevant to this PR, since the approach I took depends on the MSBuildExtensionsPath32 variable being correctly set inside MSBuild. I have only checked my PR with Mono's MSBuild implementation, xbuild, and have not yet checked whether my approach works under .Net Core since I don't currently have a working .Net Core setup on any of my Linux machines. Before you merge this PR, you should probably double-check it under .Net Core and make sure that it still does the right thing.

nikolamilekic commented 7 years ago

Does anyone have an idea why this PR causes my MacOS Terminal to display ^[[50;32R before each input, and to double up each input character (see screenshot, where I typed in Test for Project Name)? The problem goes away as soon as I delete CheckFSharpInstallation.fsproj.

untitled 2