Specflow feature.cs file throws 'BadImageFormatException' when auto-generating code

-1

After upgrading to Specflow 2.3.2, feature.cs file generated following error message when changing feature file

Unhandled Exception: System.BadImageFormatException: The module was expected to contain an assembly manifest. (Exception from HRESULT: 0x80131018) at System.Reflection.RuntimeAssembly.nLoadFile(String path, Evidence evidence) at System.Reflection.Assembly.LoadFile(String path) at TechTalk.SpecFlow.VisualStudio.CodeBehindGenerator.CommandLineHandling.PreLoadAssemblies() at TechTalk.SpecFlow.VisualStudio.CodeBehindGenerator.CommandLineHandling.PreLoadAssemblies() at TechTalk.SpecFlow.VisualStudio.CodeBehindGenerator.Program.Main(String[] args)

c#
visual-studio
specflow
asked on Stack Overflow Jul 26, 2018 by Rohith Pulumati • edited Jul 26, 2018 by Pankwood

1 Answer

1

Make sure to check the following setting in visual studio

Tools -> Options -> Specflow (General) -> Generation Mode is selected to 'AppDomain'

answered on Stack Overflow Jul 26, 2018 by Rohith Pulumati

User contributions licensed under CC BY-SA 3.0