Closed bluetarpmedia closed 3 years ago
The same steps on a different Windows 10 PC (same VS 2019 and .NET SDK version) worked fine.
Our arbiter in situations like these is the Azure Pipelines hosted agent. If it works there (and presumably some other dev boxes) then it's good and the broken box should investigate what's wrong. However if you find out what's "wrong" with the broken box and feel it's something this repo should handle better and can send a PR, we might entertain that.
Yeah, it's definitely some kind of configuration problem on that particular computer. If I find the problem I'll try to remember to post an update here for anybody in the future.
Bug description
On a Windows 10 PC with VS 2019 16.9.4 and .NET SDK 5.0.202 installed, I checked out the latest commit (ad578dfef652387364f3ec2a3840596a4449dc0c as of 10-May-21), ran the
init.ps1
script, thendotnet build
(0 warnings, 0 errors), and thendotnet test
. This produced many errors like this:(And variations of the above for
System.Void
,System.Int32
,System.Type
, etc) and:Total:
Failed: 81, Passed: 1, Skipped: 0, Total: 82, Duration: 54 s
(The one test that passes is AssemblyHasNoReferenceToMpf.)
See screenshot below for more details.
To Reproduce
init.ps1
scriptdotnet build
dotnet test
(ordotnet test -f net472
)Or after step 2, open the solution in Visual Studio 2019 16.9.4 and then build, then run the tests in the Test Explorer.
Expected behavior
The tests should all pass (according to the Azure builds).
More info
I can get most of the tests to pass by explicitly adding metadata references in the
Test
ctor (CSharpCodeFixVerifier`2.cs line 77), like this:But some of the VSSDK006 tests still fail with this error:
It's unclear why some VSSDK006 tests pass and others don't. E.g.
LocalAssigned_GetService_ThenUsedAsync
fails with that error, butLocalAssigned_GetService_ThenUsed_WithNullConditionalAsync
passes.New total with above workaround:
Failed: 17, Passed: 65, Skipped: 0, Total: 82, Duration: 1 m 4 s
Screenshots