SpecFlowOSS / SpecFlow.VS

The next version of the Visual Studio extension for SpecFlow
MIT License
39 stars 12 forks source link

Error during binding discovery: Could not load type 'Microsoft.AspNetCore.Mvc.ApplicationParts.ApplicationPartAttribute' from assembly 'Microsoft.AspNetCore.Mvc.Core, Version=2.2.2.0 #24

Open kwaazaar opened 2 years ago

kwaazaar commented 2 years ago

I use SpecFlow for an integrationtest on my webservice. These projects were not supported officially before, but by changing the sdk type afterwards, the project worked fine in VS2019 and targeting .NET 5. Now I run VS2022 and target .NET 6 and get this error. (the reference to old ASP.NET 2.2 libraries is a dependency of a referenced nuget package and was there before too)

Info: OnActivityStarted: Starting Visual Studio Extension...
Info: CreateProjectScope: Initializing project: GraphPresenceSourceService.IntegrationTests
Info: OnSettingsInitialized: Project settings initialized: .NETCoreApp,Version=v6.0,SpecFlow:3.9.8
Warning: InvokeDiscovery: Error during binding discovery. 
Command executed:
  C:\Src\UCC-Git\Solutions\GraphPresenceSourceService\GraphPresenceSourceService.IntegrationTests\bin\Debug\net6.0> C:\Program Files\dotnet\dotnet.exe exec c:\users\robert.tekaat\appdata\local\microsoft\visualstudio\17.0_c508fd07\extensions\4edcstnp.ky5\Connectors\V2-net6.0\specflow-vs.dll discovery C:\Src\UCC-Git\Solutions\GraphPresenceSourceService\GraphPresenceSourceService.IntegrationTests\bin\Debug\net6.0\GraphPresenceSourceService.IntegrationTests.dll ""
Exit code: 4
Message: 
Error: Exception has been thrown by the target of an invocation. -> Could not load type 'Microsoft.AspNetCore.Mvc.ApplicationParts.ApplicationPartAttribute' from assembly 'Microsoft.AspNetCore.Mvc.Core, Version=2.2.2.0, Culture=neutral, PublicKeyToken=adb9793829ddae60'.
Exception: System.Reflection.TargetInvocationException->System.TypeLoadException
StackTrace:
   at System.ModuleHandle.ResolveType(QCallModule module, Int32 typeToken, IntPtr* typeInstArgs, Int32 typeInstCount, IntPtr* methodInstArgs, Int32 methodInstCount, ObjectHandleOnStack type)
   at System.ModuleHandle.ResolveTypeHandle(Int32 typeToken, RuntimeTypeHandle[] typeInstantiationContext, RuntimeTypeHandle[] methodInstantiationContext)
   at System.Reflection.RuntimeModule.ResolveType(Int32 metadataToken, Type[] genericTypeArguments, Type[] genericMethodArguments)
   at System.Reflection.CustomAttribute.FilterCustomAttributeRecord(MetadataToken caCtorToken, MetadataImport& scope, RuntimeModule decoratedModule, MetadataToken decoratedToken, RuntimeType attributeFilterType, Boolean mustBeInheritable, ListBuilder`1& derivedAttributes, RuntimeType& attributeType, IRuntimeMethodInfo& ctorWithParameters, Boolean& isVarArg)
   at System.Reflection.CustomAttribute.AddCustomAttributes(ListBuilder`1& attributes, RuntimeModule decoratedModule, Int32 decoratedMetadataToken, RuntimeType attributeFilterType, Boolean mustBeInheritable, ListBuilder`1 derivedAttributes)
   at System.Reflection.CustomAttribute.GetCustomAttributes(RuntimeModule decoratedModule, Int32 decoratedMetadataToken, Int32 pcaCount, RuntimeType attributeFilterType)
   at System.Reflection.CustomAttribute.GetCustomAttributes(RuntimeAssembly assembly, RuntimeType caType)
   at System.Reflection.RuntimeAssembly.GetCustomAttributes(Type attributeType, Boolean inherit)
   at System.Attribute.GetCustomAttributes(Assembly element, Type attributeType, Boolean inherit)
   at System.Attribute.GetCustomAttribute(Assembly element, Type attributeType, Boolean inherit)
   at System.Attribute.GetCustomAttribute(Assembly element, Type attributeType)
   at TechTalk.SpecFlow.Plugins.RuntimePluginLoader_Patch.LoadPlugin(String pluginAssemblyName, ITraceListener traceListener) in D:\a\1\s\Connectors\SpecFlow.VisualStudio.SpecFlowConnector.V2\RuntimePluginLoader.cs:line 25
   at TechTalk.SpecFlow.Infrastructure.ContainerBuilder.LoadPlugin(String pluginPath, IRuntimePluginLoader pluginLoader, RuntimePluginEvents runtimePluginEvents, UnitTestProviderConfiguration unitTestProviderConfigration, ITraceListener traceListener)
   at TechTalk.SpecFlow.Infrastructure.ContainerBuilder.LoadPlugins(IRuntimeConfigurationProvider configurationProvider, ObjectContainer container, RuntimePluginEvents runtimePluginEvents, SpecFlowConfiguration specFlowConfiguration, UnitTestProviderConfiguration unitTestProviderConfigration, Assembly testAssembly)
   at TechTalk.SpecFlow.Infrastructure.ContainerBuilder.CreateGlobalContainer(Assembly testAssembly, IRuntimeConfigurationProvider configurationProvider)
   at SpecFlow.VisualStudio.SpecFlowConnector.Discovery.SpecFlowV3BaseDiscoverer.CreateGlobalContainer(IConfigurationLoader configurationLoader, Assembly testAssembly) in D:\a\1\s\Connectors\SpecFlow.VisualStudio.SpecFlowConnector.V2\Discovery\SpecFlowV3BaseDiscoverer.cs:line 36
   at SpecFlow.VisualStudio.SpecFlowConnector.Discovery.SpecFlowV3BaseDiscoverer.GetBindingRegistry(Assembly testAssembly, String configFilePath) in D:\a\1\s\Connectors\SpecFlow.VisualStudio.SpecFlowConnector.V2\Discovery\SpecFlowV3BaseDiscoverer.cs:line 25
   at SpecFlow.VisualStudio.SpecFlowConnector.Discovery.BaseDiscoverer.DiscoverInternal(Assembly testAssembly, String testAssemblyPath, String configFilePath) in D:\a\1\s\Connectors\SpecFlow.VisualStudio.SpecFlowConnector\Discovery\BaseDiscoverer.cs:line 31
   at SpecFlow.VisualStudio.SpecFlowConnector.Discovery.BaseDiscoverer.Discover(Assembly testAssembly, String testAssemblyPath, String configFilePath) in D:\a\1\s\Connectors\SpecFlow.VisualStudio.SpecFlowConnector\Discovery\BaseDiscoverer.cs:line 21
   at SpecFlow.VisualStudio.SpecFlowConnector.Discovery.VersionSelectorDiscoverer.Discover(Assembly testAssembly, String testAssemblyPath, String configFilePath) in D:\a\1\s\Connectors\SpecFlow.VisualStudio.SpecFlowConnector.V2\Discovery\VersionSelectorDiscoverer.cs:line 27
   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 SpecFlow.VisualStudio.SpecFlowConnector.ReflectionExtensions.ReflectionCallMethod[T](Object obj, String methodName, Type[] parameterTypes, Object[] args) in D:\a\1\s\Connectors\SpecFlow.VisualStudio.SpecFlowConnector\ReflectionExtensions.cs:line 30
   at SpecFlow.VisualStudio.SpecFlowConnector.Discovery.ReflectionSpecFlowDiscoverer.Discover(Assembly testAssembly, String testAssemblyPath, String configFilePath) in D:\a\1\s\Connectors\SpecFlow.VisualStudio.SpecFlowConnector.V2\Discovery\ReflectionSpecFlowDiscoverer.cs:line 21
   at SpecFlow.VisualStudio.SpecFlowConnector.Discovery.DiscoveryProcessor.Process() in D:\a\1\s\Connectors\SpecFlow.VisualStudio.SpecFlowConnector.V2\Discovery\DiscoveryProcessor.cs:line 26
   at SpecFlow.VisualStudio.SpecFlowConnector.DiscoveryCommand.Execute(String[] commandArgs) in D:\a\1\s\Connectors\SpecFlow.VisualStudio.SpecFlowConnector\DiscoveryCommand.cs:line 17
   at SpecFlow.VisualStudio.SpecFlowConnector.ConsoleRunner.EntryPoint(String[] args) in D:\a\1\s\Connectors\SpecFlow.VisualStudio.SpecFlowConnector\ConsoleRunner.cs:line 23

Warning: InvokeDiscovery: 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.
nawijesi commented 2 years ago

Me too cannot discover project bindings.

Exit code: 4
Message: 
Exception in:SpecFlow.VisualStudio.SpecFlowConnector.Discovery.V38.SpecFlowV38Discoverer
Error: Exception has been thrown by the target of an invocation. -> Unable to load one or more of the requested types.
Could not load file or assembly 'Microsoft.Extensions.Hosting.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60'. The system cannot find the file specified.
Exception: System.Reflection.TargetInvocationException->System.Reflection.ReflectionTypeLoadException
StackTrace:
   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(IEnumerable1 bindingAssemblies)
   at TechTalk.SpecFlow.TestRunnerManager.InitializeBindingRegistry(ITestRunner testRunner)
   at TechTalk.SpecFlow.TestRunnerManager.CreateTestRunner(Int32 threadId)
   at SpecFlow.VisualStudio.SpecFlowConnector.Discovery.SpecFlowV3BaseDiscoverer.GetBindingRegistry(Assembly testAssembly, String configFilePath) in D:\a\1\s\Connectors\SpecFlow.VisualStudio.SpecFlowConnector.V3\Discovery\SpecFlowV3BaseDiscoverer.cs:line 28
   at SpecFlow.VisualStudio.SpecFlowConnector.Discovery.BaseDiscoverer.DiscoverInternal(Assembly testAssembly, String testAssemblyPath, String configFilePath) in D:\a\1\s\Connectors\SpecFlow.VisualStudio.SpecFlowConnector\Discovery\BaseDiscoverer.cs:line 31
   at SpecFlow.VisualStudio.SpecFlowConnector.Discovery.BaseDiscoverer.Discover(Assembly testAssembly, String testAssemblyPath, String configFilePath) in D:\a\1\s\Connectors\SpecFlow.VisualStudio.SpecFlowConnector\Discovery\BaseDiscoverer.cs:line 21
   at SpecFlow.VisualStudio.SpecFlowConnector.Discovery.VersionSelectorDiscoverer.Discover(Assembly testAssembly, String testAssemblyPath, String configFilePath) in D:\a\1\s\Connectors\SpecFlow.VisualStudio.SpecFlowConnector.V3\Discovery\VersionSelectorDiscoverer.cs:line 25
   at System.RuntimeMethodHandle.InvokeMethod(Object target, Span1& 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 SpecFlow.VisualStudio.SpecFlowConnector.ReflectionExtensions.ReflectionCallMethod[T](Object obj, String methodName, Type[] parameterTypes, Object[] args) in D:\a\1\s\Connectors\SpecFlow.VisualStudio.SpecFlowConnector\ReflectionExtensions.cs:line 31
   at SpecFlow.VisualStudio.SpecFlowConnector.Discovery.ReflectionSpecFlowDiscoverer.Discover(Assembly testAssembly, String testAssemblyPath, String configFilePath) in D:\a\1\s\Connectors\SpecFlow.VisualStudio.SpecFlowConnector.V3\Discovery\ReflectionSpecFlowDiscoverer.cs:line 21
   at SpecFlow.VisualStudio.SpecFlowConnector.Discovery.DiscoveryProcessor.Process() in D:\a\1\s\Connectors\SpecFlow.VisualStudio.SpecFlowConnector.V2\Discovery\DiscoveryProcessor.cs:line 26
   at SpecFlow.VisualStudio.SpecFlowConnector.DiscoveryCommand.Execute(String[] commandArgs) in D:\a\1\s\Connectors\SpecFlow.VisualStudio.SpecFlowConnector\DiscoveryCommand.cs:line 17
   at SpecFlow.VisualStudio.SpecFlowConnector.ConsoleRunner.EntryPoint(String[] args) in D:\a\1\s\Connectors\SpecFlow.VisualStudio.SpecFlowConnector\ConsoleRunner.cs:line 23

Warning: InvokeDiscovery: 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.
YuceCelikel commented 2 years ago

In my case the problem was using Microsoft.NET.Sdk.Web in the test project. After I changed it to Microsoft.NET.Sdk bindings started working again.

patiqs commented 2 years ago

@kwaazaar @nawijesi I need some help to reproduce these issues locally. Can you share me your csproj content?

stegander commented 2 years ago

Hi, I have the same problem as described in this issue. Is there any progress regarding this bug? We are using Visual Studio 2022 and SpecFlow extension 2021.4.5.18546. Our test project is a Microsoft.NET.Sdk.Web.

patiqs commented 2 years ago

I plan to fix this in the next release. Please help me to reproduce this issue locally on my laptop. The best would be if you can create and share a repo where the issue exists. Or I can give you write access to our investigation repo, where you can commit a sample. If this doesn't work, then I need the csproj content of your test project

stegander commented 2 years ago

It took me a lot of digging in dependencies to figure out what caused the problem. It seems to be when I add

<PackageReference Include="Microsoft.AspNetCore.Mvc.Core" Version="2.2.5" />

I have made a test solution with one ASP.net Core Web App and one SpecFlow Project. The SpecFlow project has a project reference to the ASP.net Core Web App.

.csproj for the ASP.net Core Web App (named SpecFlowPluginExemple):

<Project Sdk="Microsoft.NET.Sdk.Web">

  <PropertyGroup>
      <TargetFramework>net6.0</TargetFramework>
      <Nullable>enable</Nullable>
      <ImplicitUsings>enable</ImplicitUsings>
  </PropertyGroup>

    <ItemGroup>
        <PackageReference Include="Microsoft.AspNetCore.Mvc.Core" Version="2.2.5" />
    </ItemGroup>

</Project>

.csproj for the SpecFlow project:

<Project Sdk="Microsoft.NET.Sdk.Web">

  <PropertyGroup>
    <TargetFramework>net6.0</TargetFramework>
    <Nullable>enable</Nullable>
    <ImplicitUsings>enable</ImplicitUsings>
  </PropertyGroup>

  <ItemGroup>
    <PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.0.0" />
    <PackageReference Include="SpecFlow.Plus.LivingDocPlugin" Version="3.9.57" />
    <PackageReference Include="SpecFlow.xUnit" Version="3.9.40" />
    <PackageReference Include="xunit" Version="2.4.1" />
    <PackageReference Include="xunit.runner.visualstudio" Version="2.4.3" />
    <PackageReference Include="FluentAssertions" Version="6.2.0" />
  </ItemGroup>

  <ItemGroup>
    <Folder Include="Drivers\" />
    <Folder Include="Support\" />
  </ItemGroup>

  <ItemGroup>
    <ProjectReference Include="..\SpecFlowPluginExemple\SpecFlowPluginExemple.csproj" />
  </ItemGroup>

</Project>

Note: Sdk for the SpecFlow project must be changed to "Microsoft.NET.Sdk.Web"

I hope this can help you reproduce this locally.

jeffreydb00 commented 2 years ago

And since 'Microsoft.AspNetCore.Mvc.Core' can be a dependency from another Nuget package as well, it's impossible to work around this. Dependencies can be found in ~//obj/project.assets.json

stegander commented 2 years ago

@patiqs were you able to reproduce the problem locally or can I help you in any way?

patiqs commented 2 years ago

@stegander Yes. Thank you for identifying the issue. I can reproduce this way

patiqs commented 2 years ago

In the past few weeks I have worked on a refactored connector. We want to publish it in the upcomming weeks, but here is a beta version if you want to test: https://github.com/SpecFlowOSS/Investigation/blob/main/SpecFlow.VisualStudio.Package.vsix

stegander commented 2 years ago

In the past few weeks I have worked on a refactored connector. We want to publish it in the upcomming weeks, but here is a beta version if you want to test: https://github.com/SpecFlowOSS/Investigation/blob/main/SpecFlow.VisualStudio.Package.vsix

I get 404 when I try to get the beta version.

Klarahov commented 2 years ago

Do you have any update on when it will be released?

jeffreydb00 commented 2 years ago

Any updates on this?

jeffreydb00 commented 2 years ago

Is this issue already fixed? It has been a while since there was an update about this.

stegander commented 2 years ago

@patiqs @gasparnagy any update on this one? I saw that the PR was not in the new release.

Klarahov commented 2 years ago

I uninstalled and reinstalled the SpecFlow VS 2022 extension. That removed this error ("The project bindings (e.g. step definitions) could not be discovered"), and left me with:

Info: OnActivityStarted: Starting Visual Studio Extension... Info: CreateProjectScope: Initializing project: Info: OnSettingsInitialized: Project settings initialized: .NETCoreApp,Version=v6.0,SpecFlow:3.9.58 Info: AndBindingSourceIsValid: Test assembly not found. Please build the project to enable the SpecFlow Visual Studio Extension features.

Then I built each project inside my solution, separaterly. Then I could built it all together and have it working. This worked for one of the projects inside the solution, but when opening a feature file in another project inside the same solution, the original error was back.

gasparnagy commented 2 years ago

@klarahovstadius Hello. I think you case is a different problem. Could you please create a new issue for that?

Klarahov commented 2 years ago

@klarahovstadius Hello. I think you case is a different problem. Could you please create a new issue for that?

Absolutely!

stegander commented 2 years ago

Now in the last version it’s working for us! Thank you! =)

jeffreydb00 commented 2 years ago

It is still not working for us. We now have a different error though. This is the error we see now:

Info: OnActivityStarted: Starting Visual Studio Extension... Info: CreateProjectScope: Initializing project: ***.***.Core.Api.Specs Info: OnSettingsInitialized: Project settings initialized: .NETCoreApp,Version=v6.0,SpecFlow:3.9.74 Warning: AndDiscoveryProviderSucceed: Error during binding discovery. Command executed: C:\Data\Projects\***\***\***.***.Core.Api.Specs\bin\Debug\net6.0> C:\Program Files\dotnet\dotnet.exe exec C:\Users\***\AppData\Local\Microsoft\VisualStudio\17.0_d19657c6\Extensions\04jeatzf.mw5\Connectors\Generic-net6.0\specflow-vs.dll discovery C:\Data\Projects\***\***\***.***.Core.Api.Specs\bin\Debug\net6.0\***.***.Core.Api.Specs.dll C:\Data\Projects\***\***\***.***.Core.Api.Specs\specflow.json Exit code: 4 Message: System.InvalidOperationException: Cannot find reference assembly 'System.Core.dll' file for package System.Core at Microsoft.Extensions.DependencyModel.Resolution.ReferenceAssemblyPathResolver.TryResolveAssemblyPaths(CompilationLibrary library, List1 assemblies) at SpecFlowConnector.AssemblyLoading.RuntimeCompositeCompilationAssemblyResolver.TryResolveAssemblyPaths(CompilationLibrary library, List1 assemblies) in D:\a\1\s\Connectors\SpecFlow.VisualStudio.SpecFlowConnector.Generic\AssemblyLoading\RuntimeCompositeCompilationAssemblyResolver.cs:line 19 System.InvalidOperationException: Cannot find reference assembly 'System.Core.dll' file for package System.Core at Microsoft.Extensions.DependencyModel.Resolution.ReferenceAssemblyPathResolver.TryResolveAssemblyPaths(CompilationLibrary library, List1 assemblies) at SpecFlowConnector.AssemblyLoading.RuntimeCompositeCompilationAssemblyResolver.TryResolveAssemblyPaths(CompilationLibrary library, List1 assemblies) in D:\a\1\s\Connectors\SpecFlow.VisualStudio.SpecFlowConnector.Generic\AssemblyLoading\RuntimeCompositeCompilationAssemblyResolver.cs:line 19 System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.MissingMethodException: Method not found: 'Int32 System.Text.Encodings.Web.TextEncoder.FindFirstCharacterToEncodeUtf8(System.ReadOnlySpan1)'. at System.Text.Json.JsonWriterHelper.NeedsEscaping(ReadOnlySpan1 value, JavaScriptEncoder encoder) at System.Text.Json.Serialization.Metadata.JsonPropertyInfo.DeterminePropertyName() at System.Text.Json.Serialization.Metadata.JsonPropertyInfo.GetPolicies(Nullable1 ignoreCondition, Nullable1 declaringTypeNumberHandling) at System.Text.Json.Serialization.Metadata.JsonPropertyInfo1.Initialize(Type parentClassType, Type declaredPropertyType, Type runtimePropertyType, ConverterStrategy runtimeClassType, MemberInfo memberInfo, Boolean isVirtual, JsonConverter converter, Nullable1 ignoreCondition, Nullable1 parentTypeNumberHandling, JsonSerializerOptions options) at System.Text.Json.Serialization.Metadata.JsonTypeInfo.CreateProperty(Type declaredPropertyType, Type runtimePropertyType, MemberInfo memberInfo, Type parentClassType, Boolean isVirtual, JsonConverter converter, JsonSerializerOptions options, Nullable1 parentTypeNumberHandling, Nullable1 ignoreCondition) at System.Text.Json.Serialization.Metadata.JsonTypeInfo.AddProperty(MemberInfo memberInfo, Type memberType, Type parentClassType, Boolean isVirtual, Nullable1 parentTypeNumberHandling, JsonSerializerOptions options) at System.Text.Json.Serialization.Metadata.JsonTypeInfo..ctor(Type type, JsonConverter converter, Type runtimeType, JsonSerializerOptions options) at System.Text.Json.Serialization.Metadata.JsonTypeInfo..ctor(Type type, JsonSerializerOptions options) at System.Text.Json.JsonSerializerOptions.<InitializeForReflectionSerializer>g__CreateJsonTypeInfo|112_0(Type type, JsonSerializerOptions options) at System.Text.Json.JsonSerializerOptions.GetClassFromContextOrCreate(Type type) at System.Text.Json.JsonSerializerOptions.GetOrAddClass(Type type) at System.Text.Json.JsonSerializer.GetTypeInfo(JsonSerializerOptions options, Type runtimeType) at System.Text.Json.JsonSerializer.Serialize[TValue](TValue value, JsonSerializerOptions options) at SpecFlowConnector.JsonSerialization.SerializeObject(Object obj) in D:\a\1\s\Connectors\SpecFlow.VisualStudio.SpecFlowConnector.Generic\JsonSerialization.cs:line 15 at FunctionalExtensions.Map[TSource,TResult](TSource this, Func2 fn) in D:\a\1\s\Connectors\SpecFlow.VisualStudio.SpecFlowConnector.Generic\NetExtensions\FunctionalExtensions.cs:line 5 at SpecFlowConnector.ReflectionExecutor.Execute(String optionsJson, Assembly testAssembly, AssemblyLoadContext assemblyLoadContext, IDictionary2 analyticsProperties) in D:\a\1\s\Connectors\SpecFlow.VisualStudio.SpecFlowConnector.Generic\ReflectionExecutor.cs:line 67 --- End of inner exception stack trace --- at System.RuntimeMethodHandle.InvokeMethod(Object target, Span1& 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.ReflectionExecutor.<>cDisplayClass0_0.b__2(Object instance) in D:\a\1\s\Connectors\SpecFlow.VisualStudio.SpecFlowConnector.Generic\ReflectionExecutor.cs:line 23 at Some1.Map[TResult](Func2 map) in D:\a\1\s\Connectors\SpecFlow.VisualStudio.SpecFlowConnector.Generic\NetExtensions\Optional\Some.cs:line 26 at SpecFlowConnector.ReflectionExecutor.Execute(DiscoveryOptions options, Func3 testAssemblyFactory, ILogger _log, IAnalyticsContainer analytics) in D:\a\1\s\Connectors\SpecFlow.VisualStudio.SpecFlowConnector.Generic\ReflectionExecutor.cs:line 21 at SpecFlowConnector.Runner.ExecuteDiscovery(DiscoveryOptions options, Func3 testAssemblyFactory) in D:\a\1\s\Connectors\SpecFlow.VisualStudio.SpecFlowConnector.Generic\Runner.cs:line 44 at SpecFlowConnector.Runner.<>cDisplayClass4_0.b__0(ConnectorOptions options) in D:\a\1\s\Connectors\SpecFlow.VisualStudio.SpecFlowConnector.Generic\Runner.cs:line 29 at FunctionalExtensions.Map[TSource,TResult](TSource this, Func2 fn) in D:\a\1\s\Connectors\SpecFlow.VisualStudio.SpecFlowConnector.Generic\NetExtensions\FunctionalExtensions.cs:line 5 at SpecFlowConnector.Runner.Run(String[] args, Func3 testAssemblyFactory) in D:\a\1\s\Connectors\SpecFlow.VisualStudio.SpecFlowConnector.Generic\Runner.cs:line 26 Newtonsoft.Json.JsonReaderException: Unexpected character encountered while parsing value: D. Path '', line 0, position 0. at Newtonsoft.Json.JsonTextReader.ParseValue() at Newtonsoft.Json.JsonReader.ReadForType(JsonContract contract, Boolean hasConverter) at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader reader, Type objectType, Boolean checkAdditionalContent) at Newtonsoft.Json.JsonSerializer.DeserializeInternal(JsonReader reader, Type objectType) at Newtonsoft.Json.JsonConvert.DeserializeObject(String value, Type type, JsonSerializerSettings settings) at Newtonsoft.Json.JsonConvert.DeserializeObject[T](String value, JsonSerializerSettings settings) at SpecFlow.VisualStudio.Connectors.OutProcSpecFlowConnector.Deserialize(RunProcessResult result, Func2 formatErrorMessage) 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.

Any ideas how to fix this?