Visual Studio 2019 version and Tests issue
Closed this issue · 9 comments
Dear Deborah,
I like your courses very much. However, it seems there is an issue , which occurs in Visual Studio 2019. There is demo: Buiding a class demo in the chapter #4. And at video time 3:34 you show how to perform and run tests (Create Unit test). However, it does not work in Visual Studio 2019, because there is no 'Run test' option. I can get the 'test explorer' window , but not able to run the tests, because it seems *.cs type files is not possible to add to the playlist of the Test Explorer. Most likely something very simple, but it seems from discussions on Pluralsight webpage other participants also were struggling with it. Your help would be appreciated,
Have a nice week,
Jolanta
Thank you for the kind words about the course.
I just re-downloaded the code and opened it in Visual Studio 2019. Without doing anything (no compile, no run options) I see this:
Dropping doen the Arrow button, I see this:
Checking the Pluralsight page for the course, I don't see any other posts regarding this issue?
Sometimes, it does take a moment for Visual Studio to find the tests. A few suggestions:
- Try a full recompile.
- Try existing Visual Studio and opening it again.
If neither of those help, could you post a screen shot of your Test Explorer window?
Dear Deborah,
Thank you for the answers. I have re-installed the Visual Studio with the same packages as yours. However, there is no longer available Microsoft. VisualStudio.QualityTools. UnitTestFramework.
Best regards,
Jolanta
The only other thing I could suggest would be to try to build a test from scratch and see if that loads the libraries you need. Both my "C# OOP" course: https://app.pluralsight.com/library/courses/object-oriented-programming-fundamentals-csharp
and my "Defensive Development in C#" course: https://app.pluralsight.com/library/courses/csharp-defensive-coding (though this one uses a different testing library)
Were recently updated and show the steps for creating a unit test project from scratch in VS 2019.
Other than this, I have no further ideas. I would have assumed that loading the project would have loaded any of the libraries that it needed.
Dear Deborah,
Thank you for the excellent suggestions.
Have a wonderful week,
Best regards,
Jolanta
The solution is here:
https://developercommunity.visualstudio.com/content/problem/833631/there-is-a-missing-project-subtype-3ac096d0-a1c2-e.html
Solution by Filip Masset Feb 05 at 01:12 PM
I got this solved by enabling the extension "Developer Analytics Tools" in Extensions -> Manage Extensions -> Installed. When an extension crashes, Visual Studio asks to disable it the next time, but it seems that this one causes issues with the MSTest projects.
As it looks like the issue is defined above, I'm closing this.
Thanks!