小编Rab*_*abi的帖子

使用 .NET core 在 MAC 操作系统中启动 Process.Start 会出现错误 - 没有这样的文件或目录

我正在创建一个 .NET Core 控制台应用程序来运行命令。

public bool RunCommand()
{
    try
    {
        var procStartInfo = new ProcessStartInfo("exec", "cal")
        {
            RedirectStandardOutput = true,
            UseShellExecute = false,
            CreateNoWindow = false
        };

        var proc = new Process { StartInfo = procStartInfo };
        proc.Start();

        // Get the output into a string
        output = proc.StandardOutput.ReadToEnd();

        return proc.ExitCode == decimal.Zero ? true : false;
    }
    finally
    {
        // do something
    }
}
Run Code Online (Sandbox Code Playgroud)

我收到以下错误 -

Unhandled Exception: System.ComponentModel.Win32Exception: No such file or directory
   at System.Diagnostics.Process.ResolvePath(String filename)
   at System.Diagnostics.Process.StartCore(ProcessStartInfo startInfo) …
Run Code Online (Sandbox Code Playgroud)

c# macos .net-core

5
推荐指数
1
解决办法
4346
查看次数

获得角度Js中的当前位置

我有一个角度js应用程序,我有一个选项,如当前位置.点击此选项,我们应该可以看到我们当前的位置,只是位置名称或该位置的谷歌地图.在这种情况下,任何正文都可以帮助使用自定义指令.该应用程序使用PhoneGap转换为Android.

angularjs cordova

0
推荐指数
1
解决办法
2220
查看次数

标签 统计

.net-core ×1

angularjs ×1

c# ×1

cordova ×1

macos ×1