title: BeforeFeature/AfterFeature does not work using SpecFlow and Coded UI
body: <p>I am not able to define a <code>[BeforeFeature]</code>/<code>[AfterFeature]</code> hook for my feature file.  The application under test is WPF standalone desktop applications.</p>
  
  <p>If I use <code>[BeforeScenario]</code>/<code>[AfterScenario]</code> everything works fine, the application starts without any problem, the designed steps are performed correctly and the app is closed. </p>
  
  <p>Once I use the same steps with <code>[BeforeFeature]</code>/<code>[AfterFeature]</code> tags the application starts and the test fails with:</p>
  
  <p>The following error occurred when this process was started: Object reference not set to an instance of an object.</p>
  
  <p>Here is an example:</p>
  
  <pre class="lang-cs prettyprint-override"><code>[Binding]
  public class Setup
  {   
      [BeforeScenario("setup_scenario")]
      public static void BeforeAppScenario()
      {
          UILoader.General.StartApplication();
      }
  
      [AfterScenario("setup_scenario")]
      public static void AfterAppScenario()
      {
          UILoader.General.CloseApplication();
      }
  
      [BeforeFeature("setup_feature")]
      public static void BeforeAppFeature()
      {
          UILoader.General.StartApplication();
      }
  
      [AfterFeature("setup_feature")]
      public static void AfterAppFeature()
      {
          UILoader.General.CloseApplication();
      }
  }
  </code></pre>
  
  <p><code>StartApplication</code>/<code>CloseApplication</code> were recorded and auto-generated with Coded UI Test Builder:</p>
  
  <pre class="lang-cs prettyprint-override"><code>public void StartApplication()
  {
      // Launch '%ProgramFiles%\...
      ApplicationUnderTest Application = ApplicationUnderTest.Launch(this.StartApplicationParams.ExePath, this.StartApplicationParams.AlternateExePath);
  }
  
  public class StartApplicationParams
  {    
      public string ExePath = "C:\\Program Files..."
      public string AlternateExePath = "%ProgramFiles%\\..."
  }
  </code></pre>
  
  <p>Noteworthy: I'm quite new with SpecFlow.
  I can't figure it out why my test fails with <code>[BeforeFeature]</code> and works fine with <code>[BeforeScenario]</code>.</p>
  
  <p>It would be great if somebody could help me with this issue.  Thanks!</p>