Last active
November 29, 2021 14:48
-
-
Save vilinski/f585d634b4270d35267e979878c1d2e4 to your computer and use it in GitHub Desktop.
FAKE script execution context - allows to run fake script with fsi
This file contains hidden or 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
#r "nuget: System.Reactive" // workaround for System.IO.FileNotFoundException: Could not load file or assembly | |
#r "nuget: Fake.Core.Target" | |
open System | |
open Fake.Core | |
let setScriptContext isCached scriptFile = | |
System.Environment.GetCommandLineArgs() | |
|> Array.skip 2 // skip fsi.exe; *.fsx | |
|> Array.toList | |
|> FakeExecutionContext.Create isCached scriptFile | |
|> Fake | |
|> setExecutionContext | |
setScriptContext false __SOURCE_FILE__ | |
// ... | |
// Targets and the rest of build.fsx |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment