Ho provato a utilizzare Visual Studio Code per eseguire un semplice script F #.Come impostare il codice di Visual Studio per l'esecuzione/debug di progetti/script F #?
Ho scaricato tutte le versioni recenti come oggi. Installa tutti i plug-in allo http://ionide.io/. Nonostante le belle gif animate che mostrano che funziona, non riesco a vedere come far funzionare la Build of code.
crea un file .ionide:
[Fake]
linuxPrefix = "mono"
command = "build.cmd"
build = "build.fsx"
Ma allora, come installare falso? Quindi, lo faccio da xamarin e lo installo. Ok, ora ho la build.fsx:
#r "packages/FAKE.4.12.0/tools/FakeLib.dll" // include Fake lib
RestorePackages()
// Properties
let buildDir = "./build/"
let testDir = "./test/"
let deployDir = "./deploy/"
// version info
let version = "0.2" // or retrieve from CI server
// Targets
Target "Clean" (fun _ ->
CleanDirs [buildDir; testDir; deployDir]
)
Target "fakeBuild" (fun _ ->
!! "./*.fsproj"
|> MSBuildRelease buildDir "Build"
|> Log "AppBuild-Output: "
)
Target "Default" (fun _ ->
trace "Hello World from FAKE"
)
// Dependencies
"Clean"
==> "fakeBuild"
==> "Default"
// start build
RunTargetOrDefault "Default"
Eseguire il falso: Costruire il comando e ottenere:
No handler found for the command: 'fake.fakeBuild'. Ensure there is an activation event defined, if you are an extension.
E ora perdersi.