Visual Studio 2010 - MyClassInitialize Has Wrong Signature

Having just upgraded an existing solution to target Visual Studio 2010 and .NET 4.0, I found all of my MSTest unit tests were giving the following error message:

Method TestProject.TestFixture.MyClassInitialize has wrong signature. Parameter 1 should be of type Microsoft.VisualStudio.TestTools.UnitTesting.TestContext.

This was caused by all the test projects still having a reference to version of Microsoft.VisualStudio.QualityTools.UnitTestFramework. Having removed this and added a reference to version, all the tests are now working just tickety-boo.

Hope this helps someone…