Closed cgravill closed 6 years ago
We could add a parameter of where the F# path is?
To be honest I think this needs a rewrite anyway, apparently using the command-line runner for VSTS tasks is "out of date" now and the PS one is the way to go.
Sure a parameter could do it.
I'm not really in the loop is there some advice that PowerShell is the way to go now?
Have a look here https://github.com/Microsoft/vsts-tasks/tree/master/Tasks there's loads of tasks.
@cgravill I've just pushed an updated version which allows you to specify the version of F# you want. This then is used to form the path to FSI.exe.
Completely untested - could you give it a go?
Does not seem to work. I get the below error:
"C:\Program Files (x86)\Microsoft SDKs\F#\${FSharpVersion}\Framework\v4.0\fsi.exe" <My script path> <My args> The system cannot find the path specified. Process completed with exit code 1 and had 1 error(s) written to the error stream.
It seems the reference to the F# version does not work. Changing ${FSharpVersion}
to $(FSharpVersion)
might do.
@skovlund I've reopened this. do let me know if it's fixed.
It is, thank you for your quick response.
This works great! I've switched our builds over to this task, thank
Thanks for these helpers @isaacabraham they're really useful for some ad hoc tasks on VSTS.
We have some build agents with only F# 4.1/VS2017 which means fsi is only present in:
C:\Program Files (x86)\Microsoft SDKs\F#\4.1\Framework\v4.0
The script is hard-coded against:
"C:\\Program Files (x86)\\Microsoft SDKs\\F#\\4.0\\Framework\\v4.0\\fsi.exe"
I was able to workaround this using https://docs.microsoft.com/en-gb/vsts/build-release/tasks/utility/batch-script but it'd be great to use the more specific tasks with F# 4.1