public static string FindExecutable() { if (!ScriptingEnvironment.IsNet45OrNewer()) { throw new CommandException("FSharp scripts require requires .NET framework 4.5"); } var myPath = typeof(FSharpEngine).Assembly.Location; var parent = Path.GetDirectoryName(myPath); var attemptOne = Path.GetFullPath(Path.Combine(parent, "FSharp", "fsi.exe")); if (File.Exists(attemptOne)) { return(attemptOne); } var attemptTwo = Path.GetFullPath(Path.Combine("..", "..", "packages", "FSharp.Compiler.Tools.4.0.0.1", "tools", "fsi.exe")); if (File.Exists(attemptTwo)) { return(attemptTwo); } throw new CommandException(string.Format("fsi.exe was not found at either '{0}' or '{1}'", attemptOne, attemptTwo)); }
public void BeforeTest(ITest testDetails) { if (!ScriptingEnvironment.IsNet45OrNewer()) { Assert.Ignore("Requires .NET 4.5"); } }
public static string FindExecutable() { if (!ScriptingEnvironment.IsNet45OrNewer()) { throw new CommandException("FSharp scripts require requires .NET framework 4.5"); } var myPath = typeof(FSharpExecutor).Assembly.Location; var parent = Path.GetDirectoryName(myPath); var executable = Path.GetFullPath(Path.Combine(parent, "FSharp", "fsi.exe")); if (File.Exists(executable)) { return(executable); } throw new CommandException(string.Format("fsi.exe was not found at '{0}'", executable)); }
public static string FindExecutable() { if (!ScriptingEnvironment.IsNet45OrNewer()) { throw new CommandException("ScriptCS scripts require the Roslyn CTP, which requires .NET framework 4.5"); } var myPath = typeof(ScriptCSScriptEngine).Assembly.Location; var parent = Path.GetDirectoryName(myPath); var executable = Path.GetFullPath(Path.Combine(parent, "ScriptCS", "scriptcs.exe")); if (File.Exists(executable)) { return(executable); } throw new CommandException(string.Format("ScriptCS.exe was not found at '{0}'", executable)); }