Have your tests created using the Logic Apps Standard Automated Test Framework disappeared from the Test Explorer in VS Code all of a sudden? We have the answer
Have your tests created using the Logic Apps Standard Automated Test Framework disappeared from the Test Explorer in VS Code all of a sudden? The answer is a mismatch between the MSTest versions used.
A recent update in the C# DevKit extension changed the minimum requirements for the MSTest library - it now requires the minimum of 3.7.*. The project scaffolding created byt the Logic Apps Standard extension uses 3.0.2.
The good news is that you can fix this by just changing package versions on your project. Follow the instructions below to have this fixed:
- Open the .csproj that the extension created (e.g. LogicApps.csproj).
- Find the ItemGroup containing your package references. It should look like this:
<itemgroup>
<packagereference include="MSTest" version="3.2.0">
<packagereference include="Microsoft.NET.Test.Sdk" version="17.8.0">
<packagereference include="MSTest.TestAdapter" version="3.2.0">
<packagereference include="MSTest.TestFramework" version="3.2.0">
<packagereference include="Microsoft.Azure.Workflows.WebJobs.Tests.Extension" version="1.0.0">
<packagereference include="coverlet.collector" version="3.1.2">
</packagereference></packagereference></packagereference></packagereference></packagereference></packagereference></itemgroup>
- Replace the package references with this new version:
<itemgroup>
<packagereference include="Microsoft.Azure.Workflows.WebJobs.Tests.Extension" version="1.*">
<packagereference include="MSTest" version="4.0.2">
<packagereference include="coverlet.collector" version="3.2.0">
</packagereference></packagereference></packagereference></itemgroup>
Once you make this change, restart VSCode window and rebuild your project - Test Explorer will start showing your tests again. Notice that this package reference is simplified as some of the previous references are already in the dependency chain, so don't need to be explicitly added.
ℹ️ We are updating our extension to make sure that new projects are being generated with the new values, but you should make those changes manually on existing projects.