Skip to content

Instantly share code, notes, and snippets.

@bpatra
Last active December 20, 2015 08:09
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 bpatra/6098579 to your computer and use it in GitHub Desktop.
Save bpatra/6098579 to your computer and use it in GitHub Desktop.
F#-ception, testing Fs2Ps with a very simple example
let myTest = "module dafuq
let x= 5
"
//disk path to FSharp code dom provider
let codDomPath = @"<myPath>\FSharp.Compiler.CodeDom.dll"
let psCode = FsToPs codDomPath myTest "dafuq" "x"
//write script to file to test it.
use streamWriter = File.CreateText("simpleExample.ps1")
streamWriter.Write(psCode)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment