The following code is not working:
ChromeOptions op = new ChromeOptions {
BinaryLocation = "./chromedriver.exe"
};
op.AddArguments("--disable-logging", "--headless", "--disable-gpu", "--no-sandbox", "--disable-dev-shm-usage");
ChromeDriver driver = new ChromeDriver(op);
Error:
OpenQA.Selenium.WebDriverException HResult=0x80131500 Message=unknown error: Chrome failed to start: was killed. (unknown error: DevToolsActivePort file doesn't exist) (The process started from chrome location ./chromedriver.exe is no longer running, so ChromeDriver is assuming that Chrome has crashed.) Source=WebDriver StackTrace: at OpenQA.Selenium.Remote.RemoteWebDriver.UnpackAndThrowOnError(Response errorResponse) at OpenQA.Selenium.Remote.RemoteWebDriver.Execute(String driverCommandToExecute, Dictionary`2 parameters) at OpenQA.Selenium.Remote.RemoteWebDriver.StartSession(ICapabilities desiredCapabilities) at OpenQA.Selenium.Remote.RemoteWebDriver..ctor(ICommandExecutor commandExecutor, ICapabilities desiredCapabilities) at OpenQA.Selenium.Chrome.ChromeDriver..ctor(ChromeDriverService service, ChromeOptions options, TimeSpan commandTimeout) at OpenQA.Selenium.Chrome.ChromeDriver..ctor(ChromeOptions options) at WebScraper.Utility.GetChromeBrowser(String binaryLocation) in C:\Users\AB\Documents\Code\CSharp\WebScraper\WebScraper\WebScraper\Utility.cs:line 20 at WebScraper.Program.d__0.MoveNext() in C:\Users\AB\Documents\Code\CSharp\WebScraper\WebScraper\WebScraper\Systems\Program.cs:line 7
Last Console Output:
Invalid --log-level value. Unable to initialize logging. Exiting...
I have tried other answers on the web and have been stuck on this problem for two days now. The arguments I have added, excluding the --headless, are arguments I have tried to get the WebDriver to start working, to no avail.
Below is the directory the .exe file is within:

I have tried disabling logging using the arguments, but it still did not work. It says it needs a "DevToolsActivePort" file, but I'm not sure how to get that file or where to put it. Is it possible to have a separate browser for my selenium application rather than using a browser already installed on a computer? Have the application self-contained rather then depending on external installations? Any suggestions will be extremely helpful!