The current version of FAKE contains two tasks for Xamarins xpkg format. These are already used in Daniel Nauck’s Portable.Licensing project (read more about this project).
Sample usage:
Thank you Daniel for this contribution.
Tags: F#, F-sharp MakeThe current version of FAKE contains two tasks for Xamarins xpkg format. These are already used in Daniel Nauck’s Portable.Licensing project (read more about this project).
Sample usage:
Thank you Daniel for this contribution.
Tags: F#, F-sharp Make| Comments (0) |
Today I released two new AssemblyInfo tasks for FAKE and marked the old one as obsolete. One advantage of the new tasks is that they only generate the specified attributes and no more. There are already a lot of predefined attributes but it’s also possible to specify new ones. Here is a small example:
Tags: F#, F-sharp Make, Fake
| Comments (3) |
In this short sample I assume you have the latest version of FAKE in ./FAKE/tools/. Now consider the following small FAKE script:
If you are on windows then create this small redirect script:
On mono you can use:
Now you can run FAKE targets easily from the command line:

This gives us the power to build scaffolding tasks or something like that.
Tags: F#, F-sharp Make| Comments (1) |
If you are using a source control system like git you probably don’t want to store all binary dependencies in it. With FAKE version 1.74 and above we can use nuget to download all dependent packages during the build.
In order to download the packages during the build we need to add nuget.exe to our repository. You can download the “Nuget.exe Command Line” from the release page.
Modify your build script and add RestorePackages() near the beginning of the script. This will use the following default parameters to retrieve all nuget packages which are specified in "./**/packages.config" files:
If you need to use different parameters please use the RestorePackage task directly.
If you don’t want to store FAKE.exe and it components in your repository you can use a batch file which downloads it before the build:
Tags: F#, F-sharp Make, nuget
| Comments (1) |
Jenkins is an extendable open source continuous integration server. In this blog post I show you how you can build FAKE’s Calculator sample with Jenkins. If you are familiar with Jenkins or Hudson then this should be straight forward.
Go to http://jenkins-ci.org/ and download/install Jenkins. In addition install the following plugins:
Create a new “free-style” task in Jenkins:
Use git as the Source Control Management tool and configure the repo as following:
Configure the build step to run FAKE from the command line:
And finally configure the post build actions:
If everything is setup correctly, then you should be able to start the build from the project page:
The output should look similar to this:
Tags: CI, Continuous Integration, F#, Jenkins| Comments (0) |
My friend Björn Rochel (@BjoernRochel) built a really cool generic model for using fakes and automocking on top of Machine.Specifications (or MSpec) called Machine.Fakes (or mfakes).
Today he released version 0.1.0.0 (get it from nuget.org) and I want to talk a bit about the build process. Björn and myself thought a tool called “Machine.Fakes” should of course be built with a tool called “FAKE – F# Make”. In order to do so I had to fix some stuff in Fake which resulted in the new Fake version 1.50.1.0.
Here are some things I fixed:
The build script for Machine.Fakes performs the following steps:
Now you can start using this awesome project by calling:
Tags: F#, Fake, Machine.Fakes, Machine.Specificationsinstall-package Machine.Fakes.{Flavor}
| Comments (4) |
After a very interesting talk by Alexander Groß at the ADC2011 about MSpec I started to play around with it. I really like the concepts and especially the Selenium support.
Today I released a new “Fake – F# Make” version with initial support for machine.specifications (MSpec) and fixed some NuGet problems incl. support for automatic push to the http://nuget.org/ feed.
Using MSpec in Fake is pretty straight forward and nearly the same like the NUnit or xUnit task:
The following sample is taken from the NaturalSpec build and creates a NuGet package. It takes the AccessKey from the build params and pushes the new package to nuget.org. There are still some missing features but you can use them by manually editing the .nuspec file.
The corresponding .nuspec file looks like this:
| Comments (1) |
Today I released “FAKE – F# Make” version 1.40.5.0. This release fixes some issues with CruiseControl.NET compatibility and improves the MSBuild task.
Important links:
Daniel Nauck created a FAKE task for CC.Net. This task allows a much easier configuration of FAKE. Please download the latest CC.NET build if you want to use it.
Daniel also created a FAKE build project on his server which showed us some compatibility issues:
@Daniel: Thank you very much for helping me on this CruiseControl.NET stuff. I really appreciate this.
The MSBuild task in FAKE gets a sequence of project files and compiles them in the given order. This might be slow if you have lots of dependent projects. Then MSBuild might analyze the dependencies over and over again. To fix this issue I currently see two possible solutions:
FAKE 1.40.5.0 implements the second idea. If you have a better idea please contact me.
Tags: docu, F#, F-sharp Make, Fake| Comments (3) |
Yesterday I released “FAKE – F# Make” version 1.33.0. This release has lots of small bug fixes and a couple of new features.
Important links:
Git is a distributed revision control system with an emphasis on speed. Git was initially designed and developed by Linus Torvalds for Linux kernel development. Every Git working directory is a full-fledged repository with complete history and full revision tracking capabilities, not dependent on network access or a central server.
In the last couple of months I worked on small helper library for controlling Git. This library is now released as part of “FAKE – F# Make”. You can find the source code at http://github.com/forki/FAKE/tree/master/src/app/Fake.Git/.
Features:
What’s a docu? A documentation generator for .Net that isn’t complicated, awkward, or difficult to use. Given an assembly and the XML that’s generated by Visual Studio, docu can produce an entire website of documentation with a single command.
Fake comes bundled with James Gregory’s documentations generator “docu”, which converts XML-Documentation comments into HTML files. All you need to do is downloading a template and calling the docu task inside your build script:
!+ (buildDir + "*.dll") |> Scan |> Docu (fun p -> {p with ToolPath = docuPath + "docu.exe" TemplatesPath = templatesSrcDir OutputPath = docsDir })
Since FAKE builds its own documentation with docu I started to add more (and hopefully better) XML doc comments. My plan is to describe more and more of the internal FAKE functions in the next releases. An updated HTML-document (generated via a docu task) can be found at http://www.navision-blog.de/fake/.
For Test-driven development (TDD) it’s sometimes nice to have the specifications next to the implementation files since the specs are considered as documentation.
By using a tool like VSCommands it is possible to group the implementation with the specs (see also http://gist.github.com/457248).
This “side by side specification” makes TDD a lot easier but of course we don’t want to deploy the specification classes and the test data.
![]() |
==> | ![]() |
FAKE has a new feature which automatically removes all specification files and test framework references according to a given convention:
Target "BuildApp" (fun _ –> !+ @"src\app\**\*.csproj" |> Scan |> Seq.map ( RemoveTestsFromProject AllNUnitReferences // a default references convention AllSpecAndTestDataFiles // a default file convention ) |> MSBuildRelease buildDir "Build" |> Log "AppBuild-Output: " )
The conventions are simple functions and can be customized e.g.:
/// All Spec.cs or Spec.fs files and all files containing TestData let AllSpecAndTestDataFiles elementName (s:string) = s.EndsWith "Specs.cs" || s.EndsWith "Specs.fs" || (elementName = "Content" && s.Contains "TestData")
| Comments (3) |
Today I released a new bugfix release for “FAKE – F# Make”. We fixed some path and logging issues and as a new feature we introduced the @@ operator which allows to combine paths.
Tags: F#, F#, F-sharp Make| Comments (1) |