title: C# - Could not load type FirefoxDriverService
body: <p>I have the following code:</p>
  
  <pre><code>    FirefoxDriverService service = FirefoxDriverService.CreateDefaultService(currentDir.Remove(0, 6), "geckodriver.exe");
      //service.HideCommandPromptWindow = true;
      service.FirefoxBinaryPath = @"C:\Program Files\Mozilla Firefox (x86)\firefox.exe";
      driver = new FirefoxDriver(service);
      driver.Manage().Window.Maximize();
  </code></pre>
  
  <p>But I get the following error:</p>
  
  <blockquote>
    <p>Error message: System.TypeLoadException : Could not load type
    'OpenQA.Selenium.Firefox.FirefoxDriverService' from assembly
    'WebDriver, Version=2.45.0.0, Culture=neutral, PublicKeyToken=null'.</p>
  </blockquote>
  
  <p>Why is this happening?</p>