Rash thoughts about .NET, C#, F# and Dynamics NAV.


"Every solution will only lead to new problems."

Friday, 25. February 2011


Machine.Fakes 0.1.0.0 released – Built with "FAKE – F# Make" 1.50.1.0

Filed under: F#,FAKE - F# Make,Tools — Steffen Forkmann at 14:09 Uhr

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:

  • New task DeleteDirs allows to delete multiple directories.
  • New parameter for NuGet task which allows to specify dependencies.
  • Bundled with docu.exe compiled against .Net 4.0.
  • Fixed docu calls to run with full filenames.
  • Added targetplatform, target and log switches for ILMerge task.
  • Added Git.Information.getLastTag() which gets the last git tag by calling git describe.
  • Added Git.Information.getCurrentHash() which gets the last current sha1.
Machine.Fakes build setup

The build script for Machine.Fakes performs the following steps:

  1. It retrieves the version no. via GitHubs REST API
  2. It cleans all directories from old stuff
  3. It compiles the app and test projects
  4. It uses MSpec to test the application
  5. It merges StructureMap and StructureMap.AutoMocking into the app by using ILMerge
  6. It generates the XML documentation using the .NET 4.0 version of docu.exe
  7. It zips the app and the documentation files
  8. It builds and deploys a Nuget package with just Machine.Fakes
  9. It builds and deploys bundled Nuget packages in the following flavors:
    1. Machine.Fakes.FakeItEasy
    2. Machine.Fakes.RhinoMocks
    3. Machine.Fakes.Moq

Now you can start using this awesome project by calling:

install-package Machine.Fakes.{Flavor}

Tags: , , ,

Friday, 18. February 2011


FAKE 1.46.0.0 with MSpec and NuGet support released

Filed under: F#,FAKE - F# Make — Steffen Forkmann at 8:49 Uhr

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.

MSpec sample

Using MSpec in Fake is pretty straight forward and nearly the same like the NUnit or xUnit task:

NuGet sample

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:

Important links
Tags: , ,