Reputation: 119
When I make changes in Specflow feature file, its not updating feature.cs file automatically and getting an error [Specflow] System.Unauthorized.Access.Exception
I am using Specflow version 3.1.97 in Visual studio 2019 and below is the configuration of Specflow extension
Upvotes: 1
Views: 2504
Reputation: 119
After above solution, I was getting an error shown in below screen capture.
The reason behind this error was my project was linked to TFS and feature.cs file was not updated as it was at lock state.
When that file was check out for edit, feature.cs file was getting updated automatically.
Upvotes: 0
Reputation: 5825
Since SpecFlow 3, you can't anymore use the SpecFlowSingleFileGenerator.
You have to use the MSBuild integration to generate the code-behind files.
But this is easy. You have simply to add the SpecFlow.Tools.MSBuild.Generation
NuGet package to your project.
If you still have configured a custom tool for your feature files, you have to remove this.
You can find more information here: https://docs.specflow.org/projects/specflow/en/latest/Tools/Generate-Tests-From-MsBuild.html
Upvotes: 3