I have recently attempted to upgrade a solution from VS2010 to VS2012, and as part of that I have introduced the new .runsettings file to generate code coverage results.
In order to specify the run settings file I have had to un-select the .testsettings file that was working in VS2010. As soon as I do this and run my tests, a large number of them start to fail because the CollectionViewSource.GetDefaultView
method returns null instead of the expected default view.
If I re-select the old .testsettings file then my tests all pass, but the code coverage settings are incorrect.
Has anyone else experienced similar problems with the upgrade?
I worked out what the problem was: one of the unit tests was manually restarting the Dispatcher
as part of some cleanup, and that worked fine in VS2010 but not in VS2012.
I guess this is pretty specific to the one solution, but it might provide a clue to anyone that finds this.