Skip to content

Instantly share code, notes, and snippets.

@PatrickMcDonald
Created April 28, 2015 14:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save PatrickMcDonald/c0a8001703b8a11f1100 to your computer and use it in GitHub Desktop.
Save PatrickMcDonald/c0a8001703b8a11f1100 to your computer and use it in GitHub Desktop.
Getting started with Paket (Adapted from suave.io)
// Step 0. Boilerplate to get the paket.exe tool
open System
open System.IO
Environment.CurrentDirectory <- __SOURCE_DIRECTORY__
let createWebClient _ =
let wc = new Net.WebClient()
wc.Proxy <- System.Net.WebRequest.DefaultWebProxy;
wc.Proxy.Credentials <- System.Net.CredentialCache.DefaultCredentials
wc
if not (File.Exists "paket.exe") then
let url = "https://github.com/fsprojects/Paket/releases/download/1.2.6/paket.exe"
use wc = createWebClient() in let tmp = Path.GetTempFileName() in wc.DownloadFile(url, tmp); File.Move(tmp,Path.GetFileName url)
// Step 1. Resolve and install the packages
#r "paket.exe"
Paket.Dependencies.Install """
source https://nuget.org/api/v2
nuget FSharp.Data
nuget FSharp.Charting
""";;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment