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...
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>
1 Answer
So I was able to resolve the issue.
Go to the top menu > select project> Build> build solution
the build is successful go to step 3
The Go into the search box with the spy glass logo and type 'test explorer'
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.
Select from option 4 and run your test.