Upgrading SpecFlow and SpecFlow+ resulting in 'SpecFlow.Plus.Runner.AssemblyHooks.cs could not be found' error - specflow

I have just attempted to upgrade my .net framework SpecFlow+ project from 3.0.225 to 3.5.14 for SpecFlow and from 3.0.391 to 3.5.8 for SpecFlow+ runner and I'm getting the following build error...
'C:\Users\Matthew.OConnor\Source\Repos\selenium\Selenium.SEPA\obj\Debug\SpecFlow.Plus.Runner.AssemblyHooks.cs' could not be found
The file isn't there but should it be there? Why might it not be there when I build?
I'm using the latest version of Visual Studio (16.8.2) and I have the following SpecFlow packages installed
SpecFlow - 3.5.14
SpecFlow.Assist.Dynamic - 1.4.2
SpecFlow.Tools.MsBuild.Generation - 3.5.14
SpecRun.Runner - 3.5.8
SpecRun.SpecFlow.3-5-0 - 3.5.8 (This displays twice for some reason but was installed once)
What could be the problem here?

I'm not quite sure what the problem was here, but creating a new project with the most up to date SpecFlow packages worked. I was then able to copy my files across

Related

MS Visual Studio 2019 - CRASH when Adding a new Scaffolding item

I'm trying to build an ASP.NET Core Web application .NET Core 3.1.
I run MS Visual Studio 2019, latest build.
I created the "Controllers" folder, an error occurs when trying to add Controller:
Error: there was an error running the selected code generator package restore failed
API Controller empty.
To resolve the issue, I tried the following to no avail:
Delete folders .vs, bin, obj
Clean and Rebuild project
Clear all NuGet caches
Restart, reboot
For what I can find it seems related to:
Error NU1202. Package Microsoft.AspNetCore.Razor 2.2.0 is not compatible with netcoreapp3.1 (.NETCoreApp,Version=v3.1). Package Microsoft.AspNetCore.Razor 2.2.0 does not support any target frameworks.
How can I solve the problem?
Resolved installing latest Visual Studio updates

Which Specflow Visual Studio Plugin version do I need to run SpecFlow 2.2.0?

I am not able to determine, which version of the SpecFlow Visual Studio plugin I need to run the old version 2.2.0 of SpecFlow
Due to administrative constraints, we cannot use any other SpecFlow version than 2.2.0
I have tried several older versions of the VS plugin, but with my existing Code (based on SpecFlow 2.2.0), all these result in the error:
Error CS1029 #error: 'Version conflict - SpecFlow Visual Studio extension
attempted to use SpecFlow code-behind
generator 1.9, but project 'XXXXXXX' references SpecFlow 2.2.'
I suppose that I need some plugin Version, that works internally with 2.2
I cannot use the SpecFlow.Tools.MsBuild.Generation package, as this is not yet supported with 2.2.0.
Anyone can help me out? The release history of the SpecFlow Visual Studio Plugins can be found here:
https://github.com/techtalk/SpecFlow.VisualStudio/releases
EDIT
I use Visual Studio 2017 (15.9.6)
In the "packages" folder there are SpecFlow-2.2.0 and SpecFlow.MsTest-2.2.0. I deleted them, I deleted the nuget package Cache and rebuild the solution.
Problem still exists.
The error you are seeing has nothing to do with the suggestions in the comments. It is an additional check we added to the extension.
For SpecFlow 2.2 you have to use an older version of the extension. You can find them at https://github.com/techtalk/SpecFlow.VisualStudio/releases
When I am remembering correctly v2017.2.7 should work for it.
Don't forget to turn off automatic updates of the extension. If you do, you will get again the latest version.
Blog post about how to do it is here: https://specflow.org/2018/vs-integration-breaking-changes-affects-all-users/
Full disclosure: I am one of the SpecFlow and SpecFlow+ developers.
make sure you install the right Specflow extension for your VS(try uninstall and reinstall as well) also make sure you set "Enable SpecflowSingleFileGenerator to false" in VS>Tools>Options>Specflow. you only need this to be true for version 3 onward I suppose.
I had this issue, and while It worked to some extend however, I just install VS 2015 and use specflow 2.2 under that. you should be able to make it work for VS 17 I guess.

"The build task could not find node.exe which is required to run the TypeScript compiler." occurred after update Boostrap

I developed an ASP.Net MVC web application and It's almost completed. After That, I updated Bootstrap through NuGet package manager to Bootstrap latest stable version 4.3.1 Update was successfully completed. But after the migration following errors are occurred.
Error Build:Cannot find name 'Record'.
Error Build:Cannot find name 'undefined'.
To solve that I installed TypeScript for Visual Studio 2015. Then the above error solved and the following error occurred.
Severity Code Description Project File Line Suppression State
Error The build task could not find node.exe which is required to run
the TypeScript compiler. Please install Node and ensure that the
system path contains its location. ABH.SW.HotelManagement
How can I solve this? I tried to google it for the past 2 days but I wasn't able to find any solution
This is the only post for this problem, so I'll do my bit for those who use Bootstrap 4.3.1, TypeScript, and VS2015.
First, once you create the project and are about to install Bootstrap 4.3.1 through NuGet, don't let Visual Studio manage TypeScript Typings for you. Check no.
Once Bootstrap and stuff is installed, clean the solution: right click on your solution -> clean solution
Next, open NuGet console (Tools → NuGet Package Manager → Package Manager Console), and install TypeScript 3.0 using this command:
Install-Package Microsoft.TypeScript.MSBuild -Version 3.0.0
Close Visual Studio, open it again, and that's it. Took for me a lot of research to find out that several TypeScript versions cause a lot of conflicts and 3.0 is one of those that actually work.
I had the same issue while trying to update to Bootstrap 4 from Visual Studio 2015. What fixed it for me was installing Typescript 2.2 for Visual Studio 2015 (https://marketplace.visualstudio.com/items?itemName=TypeScriptTeam.TypeScript22forVisualStudio2015). You may need to uninstall previous versions of Typescript Tools for VS2015 from Programs and Features.
I think Bootstrap 4.3.1 , Typescript , VS2015 has some issues with each other.
[e.g.
Compilation error from Angular and typescript in VS 2015 MVC project
]
My scenario in my project got this error
Error The build task could not find node.exe which is required to run
the TypeScript compiler. Please install Node and ensure that the
system path contains its location. ACC_Cor...
I'm using VS2017 while other team member that has problem using VS2015 with TypeScript Tools for Microsoft Visual Studio 2015 3.2.2.0 installed
He told me that after map project from source control there is and alert message of something like his typescript version is newer. So after some googling I think you should look in to this link for more information
https://github.com/Microsoft/TypeScript/issues/17136
VS2015 - Change TypeScript Version
How to run TypeScript in Visual Studio 2015 without require() or requireJS
tldr;
For Vs2015 + Bootstrap 4.3.1 I solved my issue by
Check project property
Uninstall Typescript
Install Typescript version 3.0 https://www.microsoft.com/en-us/download/details.aspx?id=48593

Specflow not working with Nunit 3.0 but working with NUnit 2.6

I am using specflow for BDD for a POC project. I had installed the nuget packages for Specflow ,Specflow.NUnit, NUnitTestAdapter and NUnit (version 2.6). I seemed to be happy since i was getting the expected result.
After a few days, I am working on a new project and i installed all the nuget packages mentioned above. Everything worked fine again. However, when i upgraded Nunit from version 2.6 to the latest stable version 3.0, my tests were not discovered in the Test explorer.
I can continue with the older version but still i would like to go with the latest stable version
I am not sure what steps do i need to take to get my specs running and see all my tests in the Test Explorer.
Any help would be appreciated.
Thanks.
The current version of specflow at time of writing (1.9) won't work with nunit 3. The new version, currently under development (v2) will support it so you will need to wait for that to use nunit v3, or use the beta version from the CI build

Unable to find SpecRun.exe when using SpecFlow 1.9 and SpecRun 1.1

Just downloaded the latest SpecFlow 1.9 from NuGet into the BookStore demo.
The scenarios run fine - everything passes.
When I install SpecRun 1.1 from NuGet and run the scenarios, SpecFlow gives me a dialog box that states: "Unable to find SpecRun.exe."
I have removed MSTest runner from app.config.
I have verified that SpecRun.exe is in:
\BookShop\packages\SpecRun.Runner.1.1.0\tools
It compiles fine, the site still runs fine - just not SpecFlow using SpecRun.
Am i missing a config step?
Thanks.
You probably need to upgrade both the NuGet-package and the VS IDE integration; http://www.specflow.org/specflownew/WhatsNew19.html.
Worked for me at least :)
I believe the problem is with the removal of MSTest. I had the same error ("Unable to find SpecRun.exe"), and in my case it was because the Test runner tool in my project settings was not set to MSTest.
I faced the similar problem.
Try to install SpecFlow 1.9.2 extension via Tools->Extension Manager...

Resources