I've been working on a personal project as of late, and to save time on testing, I wrote some unit tests. Now I've finished some methods I wanted to test, so I decided to run the test.
All tests with body fail, even before reaching the first statement. This happens for the simple reason that Visual Studio can't find file or assembly System.Runtime or one of it's dependensies. For some reason, the tests without body all succeded, but after implementing their bodies, same error message.
So I went to have a look in the references. Of course it was nowhere to be found. I tried to add it, but I can't add System.Runtime itself, only System.Runtime.SomeDeeperLevel.
Then I went to find it on docs.microsoft.com, but I can only download .NET there, not this package itself. Now I'm wondering, did something go wrong during the installation of VS and do I need to reinstall Visual Studio to solve this? Or is there some easier method to resolve this issue.
Obviously I could also chose to copy the test into something like Program.cs and test it via that method, but I think that looks disguisting.
Thanks in advance for any help.
PS. I just noticed that the unit tests have references, where my .NET 5.0 code has dependensies. I don't expect this to be the issue, but if this means I can't use the .NET 4.7.2 framework for unit testing (which is the most recent version I could find installed), then please refer to what kind of unit test system I could install to get it compatible.