I am creating a new Specflow project in VS2017. I have added 1 rule in the features file and generated the initial steps code. However, when I attempt to build the project I get the following 2 errors. (1) CS1029 #error: 'Generation error: Object reference not set to an instance of an object.' (2) Custom tool error: Generation error: Object reference not set to an instance of an object.
Feature file contains,
Feature: Change_Theme_Change_Scheme
@Change_Theme_Change_Scheme
Scenario: Verfy change of scheme
Given I log into Admin site
And I navigate to Colour Scheme page
And I select the Kumho theme
When I click the Save Theme button
Then Check website main menu background is Red
Steps file contains,
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using TechTalk.SpecFlow;
namespace Tyres_and_Service_Tester.Steps
{
[Binding]
public sealed class Change_Theme_Change_Scheme
{
[Given(@"I log into Admin site")]
public void GivenILogIntoAdminSite()
{
ScenarioContext.Current.Pending();
}
[Given(@"I navigate to Colour Scheme page")]
public void GivenINavigateToColourSchemePage()
{
ScenarioContext.Current.Pending();
}
[Given(@"I select the Kumho theme")]
public void GivenISelectTheKumhoTheme()
{
ScenarioContext.Current.Pending();
}
[When(@"I click the Save Theme button")]
public void WhenIClickTheSaveThemeButton()
{
ScenarioContext.Current.Pending();
}
[Then(@"Check website main menu background is Red")]
public void ThenCheckWebsiteMainMenuBackgroundIsRed()
{
ScenarioContext.Current.Pending();
}
}
}
Image of project references
I've not come across this before when building Specflow projects with earlier versions of VS, and cannot figure out what I've done differently Many thanks for any help. Tony
