I configured now a new computer. Installed VS 2010 and all necessary component, got my running project on that new computer..
Compiling the project shows me that VS 2010 cannot find the reference "Microsoft.VisualStudio.QualityTools.UnitTestFramework".
This assembly is located in Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\PublicAssemblies
But VS is not able to find it.
The used project is OK. It can be compiled on my old machine!
Edit: The error while compiling: error CS0234: The type or namespace name 'VisualStudio' does not exist in the namespace 'Microsoft' (are you missing an assembly reference?)
C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets(1360,9): warning MSB3245: Could not resolve this reference. Could not locate the assembly "Microsoft.VisualStudio.QualityTools.UnitTestFramework, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors.
Upgrade of some 2003 code for us was resolved through the following:
C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\PublicAssemblies\Microsoft.VisualStudio.QualityTools.UnitTestFramework.dll
The existing "USING" statement worked without change. "using Microsoft.VisualStudio.TestTools.UnitTesting;"
Check that your project is not marked for X64 platform in a mixed solution configuration (right click the solution -> Configuration Manager option). After changing the platform for the test project from X64 to Any CPU the assemblies were recognized and it worked.
I had the same problem.
Old machine:
Windows XP, 32 bit
VS 2010 (32 bit)
New machine:
Windows 7, 64 bit
VS 2010 (32 bit)
I solved it by simply deleting the reference to Microsoft...UnitTestFramework, and adding the new one, which was here:
C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\PublicAssemblies\Microsoft.VisualStudio.QualityTools.UnitTestFramework.dll
I did not need to change the target .NET framework version.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With