title: Setting BrowserSession in FeatureContext from BeforeTestRunHook SpecFlow
body: <p>Beginner using SpecFlow and c# here.</p>
  
  <p>I am trying to move my login steps from BeforeFeature to BeforeTestRun for a school project and I can't set the BrowserSession in the FeatureContext during the BeforeTestRun hook.</p>
  
  <p>I am getting this error:</p>
  
  <blockquote>
    <p>System.NullReferenceException : Object reference not set to an instance of an object.</p>
  </blockquote>
  
  <pre><code>    public sealed class Hooks
      {        
          [BeforeTestRun]
          public static void BeforeTestRun()
          {
          FeatureContextWrapper.BrowserSession = BrowserFactory.GetBrowser();
          }
      }
  </code></pre>
  
  <p>FeatureContextwrapper.cs</p>
  
  <pre><code>    public class FeatureContextWrapper
      {
          public static BrowserSession BrowserSession
          {
          get { return (BrowserSession)FeatureContext.Current["BrowserSession"]; }
          set { FeatureContext.Current.Set(value, "BrowserSession"); }
          }
      }
  </code></pre>