-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The project bindings (e.g. step definitions) could not be discovered. Navigation, step completion and other features are disabled. #162
Comments
I was struggling with this problem more than one year. I will write the steps I took, and what apparently solve the problem
At the end, it turns to recognize the steps again. I really hope it can help some of you guys struggling with this bug. |
I got same problem, but after I updated the project to dotnet 8. I updated Visual Studio to version 17.10.0 and specflow extension: After I build the project, got this error in output: Info: CheckProjectSettings: Project settings updated: .NETCoreApp,Version=v6.0,SpecFlow:3.9.74 So, it try to find 'System.Runtime, Version=8.0.0.0' after I updated project to use it.... but the latest version of it is: https://www.nuget.org/packages/System.Runtime/ I did a test and rollback the project to .NET 6.0 and it work again..... I hope specflow developer fix this soon for us use it with .NET 8 |
Please fix this! |
I found a root cause of an issue, that should be fixed by SpecFlow plugin owner. Here is a fixed file content which solves a problem !!!AND SHOULD BE FIXED BY SPECFLOW!!! { |
Probably your versions can vary |
I tried something and update this file - "specflow-vs.runtimeconfig.json" to: { I rebuild the specflow project and looks like it is working, doing more tests to confirm. But anyway, specflow owner need to fix that. |
Getting the same. Tried the fixes above and would answer. Info: OnActivityStarted: Starting Visual Studio Extension... App: c:\users\jim\appdata\local\microsoft\visualstudio\17.0_8fdfae02\extensions\bhrv5ykv.dty\Connectors\Generic-net7.0\specflow-vs.dll The following frameworks were found: Learn more: To install missing framework, download: App: c:\users\jim\appdata\local\microsoft\visualstudio\17.0_8fdfae02\extensions\bhrv5ykv.dty\Connectors\Generic-net7.0\specflow-vs.dll The following frameworks were found: Learn more: To install missing framework, download: |
Installing the extension from the releases and not from the marketplace fixed the issue for me. I also upgraded my project to .net8. |
Nice, thanks for sharing! |
I recently came across this same error and I was going to share the same link as @LockTar. I wouldn't expect any future bug fixes or development on SpecFlow going forward, so I am looking to move my existing codebases that use SpecFlow over to Reqnroll. |
I migrated everything last Friday to Reqnroll. No problems at all. |
Yes! That really works! Thank you! |
Confirming the github release version worked for me as well |
Used Visual Studio
Visual Studio 2022
Are the latest Visual Studio updates installed?
Yes
SpecFlow Section in app.config or content of specflow.json
Issue Description
Info Found V3.9.74.14555 at C:\Git\SystemTests\ScanItDental.SystemTest.WorkflowProcessingTest\bin\Debug\net6.0-windows\TechTalk.SpecFlow.dll
Info Chosen BindingRegistryFactoryBeforeV310000 for 309074
Error System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation.
---> System.Reflection.ReflectionTypeLoadException: Unable to load one or more of the requested types.
Could not load file or assembly 'PresentationCore, Version=6.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified.
at System.Reflection.RuntimeModule.GetTypes(RuntimeModule module)
at System.Reflection.Assembly.GetTypes()
at TechTalk.SpecFlow.Bindings.Discovery.RuntimeBindingRegistryBuilder.BuildBindingsFromAssembly(Assembly assembly)
at TechTalk.SpecFlow.TestRunnerManager.BuildBindingRegistry(IEnumerable
1 bindingAssemblies) at TechTalk.SpecFlow.TestRunnerManager.InitializeBindingRegistry(ITestRunner testRunner) at TechTalk.SpecFlow.TestRunnerManager.CreateTestRunner(Int32 threadId) System.IO.FileNotFoundException: Could not load file or assembly 'PresentationCore, Version=6.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified. File name: 'PresentationCore, Version=6.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' --- End of inner exception stack trace --- at System.RuntimeMethodHandle.InvokeMethod(Object target, Span
1& arguments, Signature sig, Boolean constructor, Boolean wrapExceptions)at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at System.Reflection.MethodBase.Invoke(Object obj, Object[] parameters)
at SpecFlowConnector.ReflectionExtensions.ReflectionCallMethod[T](Object obj, String methodName, Type[] parameterTypes, Object[] args) in D:\a\1\s\Connectors\SpecFlow.VisualStudio.SpecFlowConnector.Generic\NetExtensions\ReflectionExtensions.cs:line 26
at SpecFlowConnector.ReflectionExtensions.ReflectionCallMethod[T](Object obj, String methodName, Object[] args) in D:\a\1\s\Connectors\SpecFlow.VisualStudio.SpecFlowConnector.Generic\NetExtensions\ReflectionExtensions.cs:line 7
at SpecFlowConnector.SpecFlowProxies.BindingRegistryFactoryBeforeV310000.InvokeCreateTestRunner(TestRunnerManager testRunnerManager) in D:\a\1\s\Connectors\SpecFlow.VisualStudio.SpecFlowConnector.Generic\SpecFlowProxies\BindingRegistryFactoryBeforeV310000.cs:line 13
at SpecFlowConnector.SpecFlowProxies.BindingRegistryFactoryVLatest.CreateTestRunner(IObjectContainer globalContainer, Assembly testAssembly) in D:\a\1\s\Connectors\SpecFlow.VisualStudio.SpecFlowConnector.Generic\SpecFlowProxies\BindingRegistryFactoryVLatest.cs:line 62
at SpecFlowConnector.SpecFlowProxies.BindingRegistryFactoryVLatest.CreateTestRunner(Object globalContainer, Assembly testAssembly) in D:\a\1\s\Connectors\SpecFlow.VisualStudio.SpecFlowConnector.Generic\SpecFlowProxies\BindingRegistryFactoryVLatest.cs:line 55
at SpecFlowConnector.SpecFlowProxies.BindingRegistryFactory.<>c__DisplayClass2_0.b__2(Object container) in D:\a\1\s\Connectors\SpecFlow.VisualStudio.SpecFlowConnector.Generic\SpecFlowProxies\BindingRegistryFactory.cs:line 26
at FunctionalExtensions.Map[TSource,TResult](TSource this, Func
2 fn) in D:\a\1\s\Connectors\SpecFlow.VisualStudio.SpecFlowConnector.Generic\NetExtensions\FunctionalExtensions.cs:line 5 at SpecFlowConnector.SpecFlowProxies.BindingRegistryFactory.<>c__DisplayClass2_0.<GetBindingRegistry>b__0(Object dependencyProvider) in D:\a\1\s\Connectors\SpecFlow.VisualStudio.SpecFlowConnector.Generic\SpecFlowProxies\BindingRegistryFactory.cs:line 17 at FunctionalExtensions.Map[TSource,TResult](TSource this, Func
2 fn) in D:\a\1\s\Connectors\SpecFlow.VisualStudio.SpecFlowConnector.Generic\NetExtensions\FunctionalExtensions.cs:line 5at SpecFlowConnector.SpecFlowProxies.BindingRegistryFactory.GetBindingRegistry(AssemblyLoadContext assemblyLoadContext, Assembly testAssembly, Option
1 configFile) in D:\a\1\s\Connectors\SpecFlow.VisualStudio.SpecFlowConnector.Generic\SpecFlowProxies\BindingRegistryFactory.cs:line 16 at SpecFlowConnector.Discovery.SpecFlowDiscoverer.Discover(IBindingRegistryFactory bindingRegistryFactory, AssemblyLoadContext assemblyLoadContext, Assembly testAssembly, Option
1 configFile) in D:\a\1\s\Connectors\SpecFlow.VisualStudio.SpecFlowConnector.Generic\Discovery\SpecFlowDiscoverer.cs:line 24at SpecFlowConnector.Discovery.DiscoveryCommand.<>c__DisplayClass6_0.b__0(IBindingRegistryFactory bindingRegistryFactory) in D:\a\1\s\Connectors\SpecFlow.VisualStudio.SpecFlowConnector.Generic\Discovery\DiscoveryCommand.cs:line 27
at FunctionalExtensions.Map[TSource,TResult](TSource this, Func
2 fn) in D:\a\1\s\Connectors\SpecFlow.VisualStudio.SpecFlowConnector.Generic\NetExtensions\FunctionalExtensions.cs:line 5 at SpecFlowConnector.Discovery.DiscoveryCommand.Execute(AssemblyLoadContext assemblyLoadContext) in D:\a\1\s\Connectors\SpecFlow.VisualStudio.SpecFlowConnector.Generic\Discovery\DiscoveryCommand.cs:line 25 at SpecFlowConnector.ReflectionExecutor.<>c__DisplayClass3_0.<Execute>b__6(DiscoveryCommand cmd) in D:\a\1\s\Connectors\SpecFlow.VisualStudio.SpecFlowConnector.Generic\ReflectionExecutor.cs:line 82 at FunctionalExtensions.Map[TSource,TResult](TSource this, Func
2 fn) in D:\a\1\s\Connectors\SpecFlow.VisualStudio.SpecFlowConnector.Generic\NetExtensions\FunctionalExtensions.cs:line 5at SpecFlowConnector.ReflectionExecutor.<>c__DisplayClass3_1.b__2() in D:\a\1\s\Connectors\SpecFlow.VisualStudio.SpecFlowConnector.Generic\ReflectionExecutor.cs:line 80
at EitherAdapters.Try[T](Func`1 act) in D:\a\1\s\Connectors\SpecFlow.VisualStudio.SpecFlowConnector.Generic\NetExtensions\Either\EitherAdapters.cs:line 40
Warning: AndDiscoveryProviderSucceed: The project bindings (e.g. step definitions) could not be discovered. Navigation, step completion and other features are disabled.
Please check the error message above and report to https://github.com/SpecFlowOSS/SpecFlow.VS/issues if you cannot fix.
Steps to Reproduce
No particular STR. Just updated project with latest SpecFlow and target switched to .net6.0-windows.
The issue is in that PresentationCore v6.0.0.0 can not be loaded.
true is added to csproj.
Link to Repository Project
No response
The text was updated successfully, but these errors were encountered: