If you, like me, are used to run your tests outside of Visual Studio directly in command line via MsTest, you may encounter some stange and unexpected behavior while migrating to Visual Studio 2008.
Note that I'm mainly using the command line for customizing my continuous integration build and not for the day to day life.
These last months, I have been working a lot using Visual Studio 2008 and .NET framework 3.5.
But in these last weeks, to prepare the migration of a big project to Visual Studio 2008, I have decided to work with Visual Studio 2008 but targeting .NET framework 2.0 (which will be the default migration behavior when migrating a project from VS 2005 to VS 2008).
(Note I have done this test using Visual Studio 2008 Beta 2 and not with the RTM version yet)
What is the result ? We will simply compile with VS 2008 and it will generate a .NET 2.0 DLL.
So what was my thought ? That the VS 2005 tools will work on it. To check this assumption, I have launched MsTest (2005) on my DLL. (Remember it's a .NET 2.0 DLL generated by VS 2008)
And the result ? MsTest give me a simple message "No test to run".
This is very surprising for me as I was sure MsTest was loading and executing the tests via reflexion.
So why on hell it doesn't find any tests ?
Note that "of course", if you launch your test using VS 2008's MsTest, all the tests will be correctly launched.
What is the reason?
So far, I do not have any explanation to this phenomenon, but I'm currently searching in the MsTest DLL itself and in the MSDN forum to find an answer. I hope I will be able to come back soon to you !
If you have any clue or idea, leave a comment !
Edit: 2007-11-26 : Correction of typo