I wanted to setup a quick test project to test a few things in my solution. The solution has a few projects in it some class libraries, windows forms projects, etc. I just wanted to test something and now this is turning into a major pain and taking over an hour, and I don't understand why.
I add a new test project to the solution (only seems to have .Xunit or MSTest .Net core, does that matter?) and then add the appropriate project references. Running the test project from scratch works fine it's only when I set it up to run with my other projects (in the same solution) references does it get confused referencing my projects.
This issue seems to be more related to Visual Studio and test projects than MSTest or Xunit, I tried both test frameworks and get the same type of issue it can't find tests.
It's basically the same in both frameworks just can't find tests even though annotations are correct:
[12/1/21 6:37:52 PM Warning] No test is available in C:\Users\main\Tests\bin\x86\Debug\netcoreapp2.1\CadWrapperTests.dll. Make sure that test discoverer & executors are registered and platform & framework version settings are appropriate and try again.
[12/1/21 6:37:52 PM Informational] ========== Discover test finished: 0 found (0:00:03.2242021) ==========
[12/1/21 6:38:22 PM Informational] Executing test method 'Tests.CheckDrawingIsClosed'
[12/1/21 6:38:23 PM Error] System.InvalidOperationException: The following TestContainer was not found 'C:\Users\main\Tests\bin\Debug\netcoreapp2.1\CadWrapperTests.dll'
The projects are all using .NetFramework and x86 architecture, but the test project only lets me choose .Net Core and when I add new .NetCore test projects are the only options, is that the issue?
It won't find tests and the errors aren't useful but it shouldn't be this difficult to add a test project and write some tests..
Aucun commentaire:
Enregistrer un commentaire