检测代码中的路径"/usr/local/share/dotnet/dotnet"



我有一个问题,我可以在代码中以某种方式检测这个路径"/usr/local/share/dotnet/dotnet"吗?每台机器上的这个都不一样吗?我需要用这个启动控制台应用程序,mz本地机器是Mac,这可以工作,但我在windows 上启动控制台

var processInfo = new ProcessStartInfo(/usr/local/share/dotnet/dotnet);
System.ComponentModel.Win32Exception (0x80004005): The system cannot find the file specified
at System.Diagnostics.Process.StartWithCreateProcess(ProcessStartInfo startInfo)
at System.Diagnostics.Process.Start(ProcessStartInfo startInfo)

如果你在Visul Studio上工作,你可以在搜索时使用Ctrl+Shift+F添加路径(区分大小写(,在下拉菜单上使用";在所有解决方案中;并点击";搜索所有";

最新更新