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 file or assembly 'Microsoft.Extensions.Configuration.UserSecrets, Version=6.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60' #111

Open CKAWLS opened 1 year ago

CKAWLS commented 1 year ago

Used Visual Studio

Visual Studio 2022

Are the latest Visual Studio updates installed?

Yes

SpecFlow Section in app.config or content of specflow.json

{
    "bindingCulture":
    {
        "language" :"en-us"
    },
    "language":
    {
        "feature": "en-us"
    },
    "plugins": []
}

Issue Description

I am use .net6,specflow3.9.74,visual studio2022. It was worked fine with .net3.1,but when i update the sdk to 6 and change the tool to vs2022, it can not jump to the step definition now.

        <PackageReference Include="AWSSDK.S3" Version="3.3.113.2" />
        <PackageReference Include="DotNetSeleniumExtras.WaitHelpers" Version="3.11.0" />
        <PackageReference Include="MailBee.NET" Version="12.2.0" />
        <PackageReference Include="AWSSDK.S3" Version="3.3.113.2" />
        <PackageReference Include="DotNetSeleniumExtras.WaitHelpers" Version="3.11.0" />
        <PackageReference Include="MailBee.NET" Version="12.2.0" />
        <PackageReference Include="Microsoft.AspNetCore.Mvc.Testing" Version="6.0.10" />
        <PackageReference Include="Microsoft.Extensions.Caching.Redis" Version="2.2.0" />
        <PackageReference Include="Microsoft.Extensions.Configuration.UserSecrets" Version="6.0.1" />
        <PackageReference Include="Microsoft.Extensions.SecretManager.Tools" Version="2.0.2" />
        <PackageReference Include="Microsoft.AspNetCore.Mvc.Testing" Version="6.0.10" />
        <PackageReference Include="Microsoft.Extensions.Caching.Redis" Version="2.2.0" />
        <PackageReference Include="Microsoft.Extensions.Configuration.UserSecrets" Version="6.0.1" />
        <PackageReference Include="Microsoft.Extensions.SecretManager.Tools" Version="2.0.2" />
        <PackageReference Include="Microsoft.IdentityModel.Protocols" Version="6.12.2" />
        <PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.10.0" />
        <PackageReference Include="Moq" Version="4.16.1" />
        <PackageReference Include="MSTest.TestAdapter" Version="2.2.10" />
        <PackageReference Include="MSTest.TestFramework" Version="2.2.7" />
        <PackageReference Include="redis-64" Version="3.0.503" />
        <PackageReference Include="Selenium.Support" Version="3.141.0" />
        <PackageReference Include="Selenium.WebDriver" Version="3.141.0" />
        <PackageReference Include="SpecFlow" Version="3.9.74" />
        <PackageReference Include="SpecFlow.Assist.Dynamic" Version="1.4.2" />
        <PackageReference Include="SpecFlow.MsTest" Version="3.9.74" />
        <PackageReference Include="SpecFlow.Tools.MsBuild.Generation" Version="3.9.74" />
        <PackageReference Include="WebDriverManager" Version="2.12.1" />

Steps to Reproduce

  1. build the project
  2. click F12 try to jump to definition
  3. error occurred Warning: AndDiscoveryProviderSucceed: Error during binding discovery. Command executed: D:xxxx\xxxxTestIT\bin\Debug\net6.0> C:\Program Files\dotnet\dotnet.exe exec C:\Users\xxxx\AppData\Local\Microsoft\VisualStudio\17.0_cb3d9519\Extensions\kvp5nd4q.bum\Connectors\Generic-net6.0\specflow-vs.dll discovery D:\Luna\MedicoDoctor\MedicoDoctorWebTestIT\bin\Debug\net6.0\MedicoDoctorWebTestIT.dll D:xxxx\xxxTestIT\specflow.json Exit code: 4 Message: System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.Extensions.Configuration.UserSecrets, Version=6.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60'.

Link to Repository Project

No response