I have created a functional test solution for my .Net application using NUnit3 and Reqnroll (formerly SpecFlow: the project was initially created using SpecFlow, later migrated to Reqnroll).
Solution stack:.Net 4.6.2 (working in Visual Studio 2022)NUnit 3.13Reqnroll 2.03Selenium 4.23
At first, the project appeared to function as expected: solution build in Visual Studio without any problems, tests were discovered and shown in Test Explorer VS panel as expected, tests executed without any problems.
Then, a couple of days ago, the solution started having problems. The build failed for a number of issues related to NuGet packages. Bit by bit, I worked through all the problems (mostly with compatibility) and resolved the problems.
However, finally, I am stuck.
My project build is persistently returning the following error:
The "GenerateFeatureFileCodeBehindTask" task failed unexpectedly.Reqnroll.ReqnrollException->Microsoft.Build.Framework.BuildException.GenericBuildTransferredException: Unable to load plugin assembly: XXX\packages\Reqnroll.SpecFlowCompatibility.2.0.0\build\net462\Reqnroll.SpecFlowCompatibility.Generator.ReqnrollPlugin.dll. Please check https://go.reqnroll.net/doc-plugins for details. (Framework: .NET Framework 4.8.9261.0) ---> Microsoft.Build.Framework.BuildException.GenericBuildTransferredException: Could not load file or assembly 'file:///XXX\packages\Reqnroll.SpecFlowCompatibility.2.0.0\build\net462\Reqnroll.SpecFlowCompatibility.Generator.ReqnrollPlugin.dll' or one of its dependencies. Operation is not supported. (Exception from HRESULT: 0x80131515) ---> Microsoft.Build.Framework.BuildException.GenericBuildTransferredException: An attempt was made to load an assembly from a network location which would have caused the assembly to be sandboxed in previous versions of the .NET Framework. This release of the .NET Framework does not enable CAS policy by default, so this load may be dangerous. If this load is not intended to sandbox the assembly, please enable the loadFromRemoteSources switch. See http://go.microsoft.com/fwlink/?LinkId=155569 for more information.Blockquote
I have uninstalled and reinstalled all NuGet packages in the project and have tried various versions of the NuGet dependencies but to no avail.
I've been working at this for a day now and I am no closer to a solution to the issue.I would be very grateful for guidance or insights to help resolve.Additionally, I'd like to understand why and how this issue arose in the first place (to evaluate the actual realistic utility of Reqnroll: obviously an unreliable test framework is of little use).
Thanks for looking.