Moving to Paket
The application is in quite a good shape, however the dependency on Microsoft SQL Server ties it to run on Windows only (however recently there has appeared an announcement of SQL Server for Linux). Because the F# community pushes the language towards cross-platform direction, and indeed most of F# OSS projects are built with "X-Plat" in mind, we'll give it a try to port the Suave Music Store to run on Mono.
In this and next sections I'll be using Ubuntu.
Disclaimer: I'm certainly not an unix OS expert - please bear that in mind if you catch me on writing something silly about Linux configuration.
For the sake of this tutorial, we'll follow the Installation per repository wizard, but it's also possible to configure Paket on system-wide basis.
After completing steps described in the above wizard, we can use built-in
convert-from-nuget command to convert from NuGet to Paket:
$ mono .paket/paket.exe convert-from-nuget --no-install --no-auto-restore
It's likely that you'll need to remove
framework constraint from the
paket.dependencies file, so that it looks more less like following:
source https://www.nuget.org/api/v2 nuget FSharp.Core 188.8.131.52 nuget SQLProvider 0.0.9-alpha nuget Suave 1.0.0 nuget Suave.Experimental 1.0.0
We can remove the direct dependency on
FSharp.Core as well, because it's a transient dependency of
Suave - Paket will resolve it anyway.
Next, we can ask Paket to resolve dependencies and install them into our
$ mono .paket/paket.exe install --hard --force
That's it. If everything went fine, we should be now able to use Paket with the Suave Music Store. Next step is replacing the database vendor to one that could be run on Unix OS.