0

Background My team is using Visual Studio 2017, though I suspect multiple versions are affected. Basically, the post Unit Tests not discovered in Visual Studio 2017, is the first problem I ran into where multiple test projects in the same solution were added by different team members. The problem for us turned out to be because of different versions were being added and somehow that confused VS and it would not find some of our unit tests. In our case, my teammate had added a v1.1.11, and mine was 1.1.18. That caused my new tests on the latter version not to be discovered. Just now I created a new .net unit test project (full .net) and it created them with a 1.2 reference. This leads me to this question...

The Question Why does Visual Studio Unit Test Framework version keep changing in a single solution as new test projects are added? It apparently pulls in whatever the latest version is from NuGet, regardless of the pre-existing versions already in use within a solution. Then the follow up question would be, is there a way to control Visual Studio. Certainly you can manually either:

a. rollback to a prior version to have all test projects in your solution match or

b. roll everything forward

c. just ignore and assume that versions will be compatible in the future and not run into issues noted above.

Note that either a. or b. requires manual intervention in what would originally (back in the day before NuGet and MSTest was just included in your VS install) just be handled automatically via a VS patch etc.

Also, given we are starting to see side-by-side versions of MS, I'm curious about best practices (yes I know that is not in question format, so just consider blogging about it somewhere else... I just wanted to plant the seed).

Ref.

ebol2000
  • 1,195
  • 11
  • 16
  • 1
    You should use GitHub to contact the product team. The release notes are also there, so you can read each releases to know what are the changes. – Lex Li Feb 06 '18 at 19:23
  • I'll revise the question. I'm not asking why are there changes, but why does VS always pull in the latest changes with a solution without asking the developer, especially given that having multiple versions of MSTest frameworks within a solution do not play well together (please read the entire message before down-voting) – ebol2000 Feb 07 '18 at 16:13
  • its called continuous improvement. – Daniel A. White Feb 07 '18 at 16:17
  • Again, please actually read the entire message. I've revised the title with the hopes that people will read the entire issue. – ebol2000 Feb 07 '18 at 16:21
  • If someone has a suggestion for a better title, please help :). How about "How to stop Visual Studio from automatically pulling the latest version into an established solution that already has another (possibly conflicting) version of MSTest" – ebol2000 Feb 07 '18 at 16:23
  • This is the case you have to give in. VS2017 is now releasing so often, so as all the dependencies like MSTest. There is no more good reason to use older releases. Of course, as VS2017 is the very first release from Microsoft to emphasize such a shift in releasing bits, the experience would not be perfect. – Lex Li Feb 07 '18 at 23:44
  • @LexLi ... yes that makes sense. I'm guessing over time this type of issue will settle out. But I do wonder if there isn't a way to freeze the version at the solution level, or otherwise synchronize the MSTest versions across the projects of a solution, given that VS is impacted by multiple versions of MSTest being present. I think many people never realize there is a compat issue preventing their tests from running from VS, and end up settling for just running from cmd-line, etc. – ebol2000 Feb 08 '18 at 15:56

0 Answers0