开发者

SpecFlow - The name 'GenerationTargetLanguage" does not exists in the current context - build error

I'm getting this error trying to build a project. It's highlighting words in my feature pages and giving me this error.

Error 1 The na开发者_JS百科me 'GenerationTargetLanguage' does not exist in the current context

I tried to Run Custom Tool on each feature but that made my errors go from two of the same, to three of these errors.

Found one other person with the problem in the google groups. No solution.


I had the same problem when i installed the newest version of specflow and tried to compile an example project because the example had a local copy of an older version of the specflow dll. The new specflow - feature-file compiler generates sourcecode for a call to a non existing specflow-dll method signature.

I solved the problem by replacing the specflow-dll in the projects lib-directory with with the dll from my newer installation.


I ran into the exact same error under different circumstances. I had originally (early 2011) installed Specflow v1.5.0.0 using the msi installer, but just today used NuGet to install version 1.8.1.0 for a particular project (using Install-Package SpecFlow -ProjectName MyProject).

I quit all instances of Visual Studio, downloaded and ran the msi installer for v1.8.1.0 and then fired up Visual Studio again, deleted my existing feature files and added new ones, and everything worked.


I found it was a breaking change. In the xyz.feature.cs the enum GenerationTargetLanguage.CSharp should now be replaced with ProgrammingLanguage.CSharp

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜