-
Notifications
You must be signed in to change notification settings - Fork 325
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
Strange message if test fails with preview 5.0.100-preview.2.20176.6 #2384
Comments
Same happens for me with 3.1.400. |
I think this message is a feature of msbuild that is only printed in previews. They wanted to enable it for release builds as well, but because the error was confusing they did not. At least that is what I understood from the brief mention in some meeting, but I don't know who to ask now. 🙂 |
Either that or we are not following some contract correctly. dotnet/msbuild#5508 |
@nohwnd |
@nohwnd Originally posted by @Dreamescaper in #2384 (comment) dotnet 3.1.401 /usr/share/dotnet/sdk/3.1.401/Microsoft.TestPlatform.targets(32,5): error MSB4181: The "Microsoft.TestPlatform.Build.Tasks.VSTestTask" task returned false but did not log an error. |
Same happens with 3.1.401, but not with 3.1.202 |
I get this error after upgrading from 3.1 to 5.0. My test ouput (via coverlet) is as follows: ./test.ps1 |
@johndaintree we've seen this happen with the latest dotnet 5.0 SDKs and with Microsoft.NET.Test.Sdk nuget package in version 16.2.0 or older. Which version are you using? |
This is caused by Nuget.Frameworks, change that started returning net5.0 in the DotNetFrameworkName, this change was reverted and I cannot reproduce the issue on the latest RC1 build from https://github.com/dotnet/installer#installers-and-binaries It does not reproduce on Preview7, reproduces on Preview8 and reproduces on older versions of RC1, but not on recent versions of RC1. |
@nohwnd dotnet info follows. I'm on preview 8, but I'm happy to try RC1. Looks like I'm using Microsoft.NET.Test.Sdk 16.1.0, so it's probably wise for me to update that too. dotnet --info Runtime Environment: Host (useful for support): .NET SDKs installed: .NET runtimes installed: To install additional .NET runtimes or SDKs: |
@johndaintree yeah it will fail that way on this Preview8 build. If you get todays RC1 from dotnet/installer it will work. It will also work if you update Test.SDK to 16.3.0 or newer. One last thing you might run into if you decide to just update is that xUnit tests are also affected by this. And will show |
@nohwnd, thanks. I'll try all that. :) |
This will continue to happen until they fix it in MSBuild, but we are setting the property, so once they fix it the message will go away. |
I was getting the same error with .NET Core 3.1. Thought of sharing my experience and how I resolved it. I ran dotnet test command with normal verbosity (appending "-v n") and found the error came because of some target mismatch between .sln and .csproj files. I deleted the .sln file and then ran the test(via dotnet test command) and error was no more. |
I can confirm that this problem went away (for me) with 5,0 RC1 |
Happens to me on SDK 3.1.402, too. It happens consistently when a test fails, but also intermittently when all tests pass: dotnet/sdk#13431 |
Same for me, |
@mwpowellhtx this should be fixed in 5.0-rc2, but will continue to happen on 3.1, there is servicing fix dotnet/toolset#4941 up for consideration, so hopefully the committee deciding about that will approve and merge. |
@nohwnd Appreciate the update, thank you. Is there anything I can do on my end? Pin a |
You can stick with older 3.1 sdk. |
In my case I was just missing NuGet package Microsoft.NET.Test.Sdk in my solution's test project... |
If a test fails I get strange output at the end of tests for a test project
It doesn't happen if I pin sdk to
3.1.201
The text was updated successfully, but these errors were encountered: