We are using TFS 2010 to build our solutions and run unit tests (MSTest). Everything used to work fine and our builds succeeded when all unit tests passed.
However, after updating our test projects to .Net 4, all builds fail with error message 'Results file does not exist. Publish failed'. This occurs even though all tests pass.
We have tried installing http://support.microsoft.com/kb/983504 to no avail.
Running MSTest with diagnostic logging creates a huge file, but the log contains no error message. The only line I find slightly interesting is
TestFormatsConverter.LoadAsCurrentVersion: <path_to_build>\TestResults\tfsservice_<service> 2012-03-28 09_51_49_Any CPU_Debug.trx is already the current file format.
Our old solutions, which have not been updated, still succeeds.
Update
After observing the build folders on the build machine during a build, I noticed that the .trx file for the failing solutions are not created in the TestResults folder. For the old solutions, the file is created. Is there any reason why upgrading to .Net 4 might cause the .trx file not being created?