Last active
November 7, 2015 13:26
-
-
Save DmitriyVlasov/f4442dd3c16e0adb9149 to your computer and use it in GitHub Desktop.
Использование paket из интерактивной сессии F#
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Делаем текущий каталог рабочей директорией | |
System.Environment.CurrentDirectory <- __SOURCE_DIRECTORY__ | |
// Если файл paket.exe не существует загружаем его | |
if not (System.IO.File.Exists "paket.exe") then | |
let url = "http://fsprojects.github.io/Paket/stable" | |
use wc = new System.Net.WebClient() | |
let tmp = System.IO.Path.GetTempFileName() | |
let stable = wc.DownloadString(url) | |
wc.DownloadFile(stable,tmp) | |
System.IO.File.Move(tmp,System.IO.Path.GetFileName stable) | |
#r "paket.exe" | |
// Инициализируем файл paket.dependencies | |
Paket.Dependencies.Init() | |
// Создаем функцию для работы с зависимостями | |
let dependencies = Paket.Dependencies.Locate(__SOURCE_DIRECTORY__) | |
// Добавляем нужные для работы скрипта зависимости | |
dependencies.Add "FSharp.Management" | |
// Используем библиотеку | |
#I @"packages/FSharp.Management/lib/net40/" | |
#r @"FSharp.Management.dll" | |
/////////////////////////////////////////////////////////// | |
// см. подробнее http://fsprojects.github.io/Paket/reference-from-repl.html |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment