title: Asp.net core: Selenium doesn't see geckodriver in current directory
body: <p>web api core 2.0 project doesn't see geckodriver.exe
  How can I fix it?!</p>
  
  <p>I created a asp.net core 2.0 web api project.
  I put a geckodriver.exe to directory with project, I changed "Copy to output directory" to "Copy always".</p>
  
  <p>This is my controller:</p>
  
  <pre><code>using System;
  using System.Collections.Generic;
  using Microsoft.AspNetCore.Mvc;
  using OpenQA.Selenium;
  using OpenQA.Selenium.Firefox;
  
  namespace WebApplication1.Controllers
  {
      [Route("api/[controller]")]
      public class ValuesController : Controller
      {
          // GET api/values
          [HttpGet]
          public IEnumerable&lt;string&gt; Get()
          {
              if (!System.IO.File.Exists("geckodriver.exe"))
              {
                 throw new Exception("error"); 
              }
  
              using (IWebDriver driver = new FirefoxDriver())
              {
                  driver.Navigate().GoToUrl("http://gooogle.com");
              }
              return new string[] { "value1", "value2" };
          }
      }
  }
  </code></pre>
  
  <p>When I start my project, I get exception message</p>
  
  <blockquote>
    <p>OpenQA.Selenium.DriverServiceNotFoundException: 'The geckodriver.exe file does not exist in the current directory or in a directory on the PATH environment variable. The driver can be downloaded at <a href="https://github.com/mozilla/geckodriver/releases" rel="nofollow noreferrer">https://github.com/mozilla/geckodriver/releases</a>.'</p>
  </blockquote>
  
  <p>I wonder why .net framework mvc application with same code works well!</p>
  
  <p>My question is: how to fix my problem? I can't find a solution on google</p>