I have a VS2008 project that is being converted to VS2010. This solution has a MsTest test project used to run database test against a Database project. After conversion you need to target the 4.0 framework for the test project, you run the test and you get
Microsoft.Build.BuildEngine.InvalidProjectFileException: Microsoft.Build.BuildEngine.InvalidProjectFileException: The expression “HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\9.0\[email protected]” cannot be evaluated.. Aborting test execution
This is due to the fact that the test project probably references old version of the Microsoft.Data.Schema and Microsoft.Data.Schema.UnitTesting dll, just verify that you are using the correct version, simply remove the above two dll from references and add them again using the right version.
Figure 1: reference rigth database testing dll for MSTest
this is not enough, because you need also to go to app.config and change the version of the database test related configuration section
As you can see the Version should be changed to 10.0.0.0 because you should have 184.108.40.206 (the one related to VS2008 database testing tools)
Now all of your test should run fine again.