New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
System.IO.FileNotFoundException: No test is available in <myassembly.dll> when run from TFS #12
Comments
Can you try executing the tests from TFS build with coverage disabled? I ask because this doesn't seem like a coverlet issue |
I don't have code coverage enabled as we don't have the Enterprise version. I'm not using any of the TFS test tasks as I'm using dotnet test for all our .NET Core testing requirements including code coverage. |
I have managed to get this working. If running coverlet from inside TFS you need to explicitly specify the project and suppress it from doing a build and restore. For example dotnet test "Project.Tests.csproj" --no-build --no-restore /p:CollectCoverage=true |
Possibly TFS doesn't have access to the same environment as when executed from the command-line. But there's a perfectly valid workaround so this issue may be closed. |
I am getting the error
"System.IO.FileNotFoundException: No test is available in <myassembly.dll>. Make sure test project has a nuget reference of package "Microsoft.NET.Test.Sdk" and framework version settings are appropriate and try again."
...when running a batch script from TFS that executes coverlet.
I have added a reference to the "Microsoft.NET.Test.Sdk" assembly to my project (it is added by default by Visual Studio).
My project is ASP.NET Core 2.0 Razor Pages
Visual Studio 2017 15.3
MSBUILD 15
Team Foundation Services 2015
It runs without any errors when executed directly from the build server from the command-line. The error only occurs when executed from our TFS build.
The text was updated successfully, but these errors were encountered: