Detect path in code "/usr/local/share/dotnet/dotnet"

0

I have a question can I detect this path "/usr/local/share/dotnet/dotnet" somehow in code? Is this on every machine different? I need to start a console application with this, mz local machine is Mac and this works, but I am starting the console on 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)
c#
asked on Stack Overflow Mar 19, 2021 by RD JT • edited Mar 19, 2021 by RD JT

1 Answer

-1

If you are working on Visul Studio you can use Ctrl + Shift + F on search add the path(is case sensitive) and on th drop down use "In all solution" and click on "Search all"

answered on Stack Overflow Mar 19, 2021 by Daniel Bistuer

User contributions licensed under CC BY-SA 3.0