Ошибки при попытке запустить F # Interactive (fsi.exe) с помощью System.Diagnostics.Process (. Net Core 3.1) - PullRequest
0 голосов
/ 06 января 2020

Я пытаюсь запустить экземпляр fsi.exe с помощью System.Diagnostics.Process из приложения, скомпилированного для. Net Core 3.1.

При выполнении кода я получаю следующие ошибки из. Net Основные инструменты, как описано на Веб-сайте MSDN :

Could not execute because the specified command or file was not found.
Possible reasons for this include:
  * You misspelled a built-in dotnet command.
  * You intended to execute a .NET Core program, but dotnet-xyz does not exist.
  * You intended to run a global tool, but a dotnet-prefixed executable with this name could not be found on the PATH.

Я пробую следующий код, есть идеи, почему это не работает?

   var startInfo = new ProcessStartInfo
   {
      WorkingDirectory = @"C:\temp\.net core 3.1.0\fsharp",
      FileName = @"dotnet ""C:\Temp\.net core 3.1.0\fsharp\fsi.exe"""
   };

   var process = new Process
   {
      StartInfo = startInfo
   };

   process.Start();

Ниже показан пример этой работы из окна консоли:

enter image description here

...