C# code is not getting generated for the given feature file on saving

Ask general questions here.
ramanaramidi
Posts: 18
Joined: Wed Feb 26, 2020 6:51 am

C# code is not getting generated for the given feature file on saving

Post by ramanaramidi » Wed Feb 26, 2020 7:01 am

Hi,

C# code is not getting generated for the given feature file on saving. The below error message is displayed in the feaure.cs file.

#error Generation error: Could not load file or assembly 'TechTalk.SpecFlow, Version=1.9.0.77, Culture=neutral, PublicKeyToken=0778194805d6db41' or one of its dependencies. The system cannot find the file specified.

I am not sure why the specflow version is displayed as 'TechTalk.SpecFlow, Version=1.9.0.77,

I am currently using the below versions

My Ranorex version is 9.2.1
.Net runtime version 4.0
SpecFlow version 3.1.86


Please help.

Thanks,
Ramana.

User avatar
odklizec
Ranorex Guru
Ranorex Guru
Posts: 5776
Joined: Mon Aug 13, 2012 9:54 am
Location: Zilina, Slovakia

Re: C# code is not getting generated for the given feature file on saving

Post by odklizec » Wed Feb 26, 2020 2:46 pm

Hi,

Please check this answer...
https://www.ranorex.com/forum/viewtopic ... 432#p55489

Also, Ranorex 9.2.x requires, at very least, .Net 4.6.2! I think this is unrelated to your problem, but anyway, if your .Net version is really 4.0, you should update it with 4.6.2 or higher.
Pavel Kudrys
Ranorex explorer at Descartes Systems

Please add these details to your questions:
  • Ranorex Snapshot. Learn how to create one >here<
  • Ranorex xPath of problematic element(s)
  • Ranorex version
  • OS version
  • HW configuration

ramanaramidi
Posts: 18
Joined: Wed Feb 26, 2020 6:51 am

Re: C# code is not getting generated for the given feature file on saving

Post by ramanaramidi » Fri Feb 28, 2020 7:54 am

Hi,

Thanks for the reply. I am using the dotnet framework version 4.6.2 and other things given in the below link are taken care.
https://www.ranorex.com/forum/viewtopic ... 432#p55489

But still I am unable to translate the feature file to C# code.


Regards,
Ramana.

User avatar
odklizec
Ranorex Guru
Ranorex Guru
Posts: 5776
Joined: Mon Aug 13, 2012 9:54 am
Location: Zilina, Slovakia

Re: C# code is not getting generated for the given feature file on saving

Post by odklizec » Fri Feb 28, 2020 8:54 am

Hi,

I would suggest to again go though the Ranorex/SpecFlow integration steps and check if everything is set correctly...
https://www.ranorex.com/blog/how-to-use ... d-process/
Check mainly troubleshootings, where you can find paragraph called "The code/csharp file is not generated" ;) Hope this helps?
Pavel Kudrys
Ranorex explorer at Descartes Systems

Please add these details to your questions:
  • Ranorex Snapshot. Learn how to create one >here<
  • Ranorex xPath of problematic element(s)
  • Ranorex version
  • OS version
  • HW configuration

ramanaramidi
Posts: 18
Joined: Wed Feb 26, 2020 6:51 am

Re: C# code is not getting generated for the given feature file on saving

Post by ramanaramidi » Mon Mar 02, 2020 8:35 am

Thanks for the help. I have gone through the steps once again and able to generate C sharp file.

User avatar
odklizec
Ranorex Guru
Ranorex Guru
Posts: 5776
Joined: Mon Aug 13, 2012 9:54 am
Location: Zilina, Slovakia

Re: C# code is not getting generated for the given feature file on saving

Post by odklizec » Mon Mar 02, 2020 9:24 am

Hi,

Nice to hear that. Have a nice day ;)
Pavel Kudrys
Ranorex explorer at Descartes Systems

Please add these details to your questions:
  • Ranorex Snapshot. Learn how to create one >here<
  • Ranorex xPath of problematic element(s)
  • Ranorex version
  • OS version
  • HW configuration