FAKE – F# MakeMay 26, 2018
In this tutorial you will learn how to set up a complete build infrastructure with “FAKE – F# Make”
In this tutorial you will learn how to set up a complete build infrastructure with “FAKE – F# Make””FAKE – F# Make” is completely written in F# and all build scripts will also be written in F#, but this doesn’t imply that you have to learn programming in F#. In fact the “FAKE – F# Make” syntax is hopefully very easy to learn.
There are various ways to install FAKE 5:
Install the ‘fake‘ or ‘fake-netcore‘ package for you system (currenty chocolatey)
Example choco install fake -pre
In Net Core, you use config and command below:Add <DotNetCliToolReference Include=”dotnet-fake” Version=”5.0.0-*” /> to your dependencies
<Project Sdk="Microsoft.NET.Sdk"> <PropertyGroup> <TargetFramework>netstandard2.0</TargetFramework> </PropertyGroup> <ItemGroup> <DotNetCliToolReference Include="dotnet-fake" Version="5.0.0-*" /> </ItemGroup> </Project>
Run dotnet fake … instead of fake …
Install fake as a global dotnet tool:
run dotnet tool install fake-cli -g –version=5.0.0-* to install fake globally or dotnet tool install fake-cli –tool-path your_tool_path –version=5.0.0-* to install fake into your_tool_path. Use –version to specify the version of fake.
If you use in other project C# via Visual Studio, you can download Fake.nupkg and add to project with structure below:
Root |_ Nuget |_ FAKE.nupkg // Nuget Fake package |_ build.bat // Batch script call F# to build project |_ build.fsx // Script F#
The next tutorial will introduce how to edit and run scripts…