SpecFlow.VisualStudio
SpecFlow.VisualStudio copied to clipboard
Culture sr-Cyrl - Cannot generate step definitions
SpecFlow Version:
- [x] 3.0
- [ ] 2.4
- [ ] 2.3
- [ ] 2.2
- [ ] 2.1
- [ ] 2.0
- [ ] 1.9
Used Test Runner
- [ ] SpecFlow+Runner
- [ ] MSTest
- [ ] NUnit
- [x] Xunit
Version number: 2.4.1
Project Format of the SpecFlow project
- [ ] Classic project format using
packages.config
- [x] Classic project format using
<PackageReference>
tags - [ ] Sdk-style project format
.feature.cs files are generated using
- [x]
SpecFlow.Tools.MsBuild.Generation
NuGet package - [ ]
SpecFlowSingleFileGenerator
custom tool
Visual Studio Version
- [x] VS 2019
- [ ] VS 2017
- [ ] VS 2015
Enable SpecFlowSingleFileGenerator Custom Tool
option in Visual Studio extension settings
- [ ] Enabled
- [ ] Disabled (I don't know about this setting)
Are the latest Visual Studio updates installed?
- [x] Yes
- [ ] No, I use Visual Studio version
<Major>.<Minor>.<Patch>
.NET Framework:
- [ ] >= .NET 4.5
- [ ] before .NET 4.5
- [ ] .NET Core 2.0
- [ ] .NET Core 2.1
- [x] .NET Core 2.2
- [ ] .NET Core 3.0
Test Execution Method:
- [x] Visual Studio Test Explorer
- [ ] TFS/VSTS/Azure DevOps – Task – PLEASE SPECIFY THE NAME OF THE TASK
- [ ] Command line – PLEASE SPECIFY THE FULL COMMAND LINE
<SpecFlow> Section in app.config or content of specflow.json
{
"language": {
"feature": "sr-Cyrl-RS"
}
}
Note: I have tried both "sr-Cyrl-RS" and "sr-Cyrl", but neither of them work.
Repro Project
Issue Description
I tried the culture "ru-RU" which works correctly but the culture "sr-Cyrl-RS" does not work correctly (build error)
Steps to Reproduce
- Open the attached demo solution in VS 2019: SpecFlowDemo.zip
- Rebuild the solution. The project "Russian" builds correctly, whilst the project "Serbian" fails to build.
- Open the Test Explorer, there will be one test for "Russian", run it, the test runs successfully,
- No tests appear for "Serbian".
- In the
Serbian
project thespecflow.json
is namedspecflow1.json
, so we can't find it and can't read the language config. -
sr-Cyrl-RS
doesn't work, butsr-Cyrl
works.
Thanks for that, I now fixed specflow.json and build works, so I've now attached the zip file where build works: SpecFlowDemo_02.zip
However, the next issue I get is as follows:
- Inside the Serbian project, I open the file SpecFlowFeature1.feature
- There is no syntax highlighting appearing for the key words (feature, scenario, Given, When, Then, etc.)
- When I right -hand click and on the menu I select "Generate step definitions" then I get the error dialog "Object reference not set to an instance of an object"