3
votes

Neither the integrated test environment nor Resharper won't run any unit tests.

When starting Visual Studio the Test Output Pane shows 10+ lines stating:

An exception was thrown while initializing part "Microsoft.VisualStudio.TestWindow.Controller.TestPlatformProvider".

This is what I've tried so far:

  • Clear folder %LocalAppData%\Microsoft\VisualStudio\14.0\ComponentModelCache
  • Create a simple test project with one class library, one class and one test library containing one unit test for that class
  • Uninstallation and new installation of Visual Studio 2015

All actions didn't fix the problem. Even the simple test won't run.

Running tests from command line using MSTest does work.

1
Does the windows event log tell you any thing about the failure?Gusdor
No, unfortunately not. But if I hit Test -> Run -> All Tests from within Visual Studio's Menu, the application will crash every now and then and if it doesn't crash it will apparently do nothing. The event log after the crash tells the follwoing: Exception Info: System.ArgumentException at Microsoft.VisualStudio.TestWindow.ValidateArg.NotNullOrEmptyCortoMaltese

1 Answers

0
votes

Ensure that your anti-virus programs are not quarantining Visual Studio components.

I had this problem when our corporate IT department changed our Sophos Protection Quarantine policy. VS2015 Unit testing stopped working for everyone, with a similar error.