Trying to Clean Specflow Bdd Test Error: Test Assembly Not Found. Please Build the Project to Enable the Specflow Visual Studio Extension Features

I currently training on how to Specflow with C#. I made a few changes to my test saved them. I then performed a 'clean' at project level and got the following error message.

Severity    Code    Description Project File    Line    Suppression State
Warning     Test assembly not found. Please build the project to enable the SpecFlow Visual Studio Extension features.  

    0   

and this

Severity    Code    Description Project File    Line    Suppression State
Error   IDE1100 Error reading content of source file 'C:\Users\myname\source\repos\UdemyTrainingProject\UdemyTrainingProject\obj\Debug\net6.0\UdemyTrainingProject.AssemblyInfo.cs' -- 'Could not find file 'C:\Users\myname\source\repos\UdemyTrainingProject\UdemyTrainingProject\obj\Debug\net6.0\UdemyTrainingProject.AssemblyInfo.cs'.'.   UdemyTrainingProject    C:\Users\myname\source\repos\UdemyTrainingProject\UdemyTrainingProject\obj\Debug\net6.0\UdemyTrainingProject.AssemblyInfo.cs    1   Active

Csprog file

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

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

    <IsPackable>false</IsPackable>
  </PropertyGroup>

  <ItemGroup>
    <PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.1.0" />
    <PackageReference Include="NUnit" Version="3.13.3" />
    <PackageReference Include="NUnit3TestAdapter" Version="4.2.1" />
    <PackageReference Include="NUnit.Analyzers" Version="3.3.0" />
    <PackageReference Include="coverlet.collector" Version="3.1.2" />
    <PackageReference Include="Selenium.Firefox.WebDriver" Version="0.27.0" />
    <PackageReference Include="Selenium.Support" Version="4.4.0" />
    <PackageReference Include="Selenium.WebDriver" Version="4.4.0" />
    <PackageReference Include="Selenium.WebDriver.ChromeDriver" Version="105.0.5195.5200" />
    <PackageReference Include="Selenium.WebDriver.MicrosoftDriver" Version="17.17134.0" />
    <PackageReference Include="SpecFlow" Version="3.9.74" />
    <PackageReference Include="SpecFlow.NUnit" Version="3.9.74" />
    <PackageReference Include="SpecFlow.Tools.MsBuild.Generation" Version="3.9.74" />
  </ItemGroup>

  <ItemGroup>
    <Folder Include="Features\" />
    <Folder Include="Utilities\" />
  </ItemGroup>

  <ItemGroup>

please watch this video

2

1 Answer

So I was able to resolve the issue.

  1. Go to the top menu > select project> Build> build solution

  2. the build is successful go to step 3

  3. The Go into the search box with the spy glass logo and type 'test explorer'

  4. In test explorer you have the choice of 2 ways to run:

    • the small green triangle will run ALL tests
    • the large green triangle will your chosen test only.
  5. Select from option 4 and run your test.

4

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Chloe Bennett

Chloe Bennett

Culture, Media & Entertainment Columnist

Chloe Bennett explores the intersection of pop culture, streaming entertainment, digital trends, and contemporary lifestyle. Her weekly commentary reaches thousands of culture enthusiasts.

Share this article
Twitter Facebook Pinterest