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


"Every solution will only lead to new problems."

Wednesday, 9. January 2013


Using nuget package restore with “FAKE – F# Make” – Get rid of the binaries in your source code repository

Filed under: F#,FAKE - F# Make — Steffen Forkmann at 16:35 Uhr

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.

Setting the stage for nuget

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.

image

Restore packages from the build script

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.

Download latest version of FAKE via nuget

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: , ,

1 Comment »

  1. [...] Steffen Forkmann blogged “Using NuGet package restore with “FAKE – F# Make” – Get rid of the binaries in your source c…“. [...]

    Pingback by F# Weekly #2, 2013 « Sergey Tihon's Blog — Sunday, 13. January 2013 um 21:02 Uhr

RSS feed for comments on this post. | TrackBack URI

Leave a comment

XHTML ( You can use these tags): <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> .