Unity Unit Test - "Visual Studio does not exist in the namespace Microsoft" error

After unzipping the Unity Application Block Source Code, loading the Unity solution Visual Studio 2008 and converting the source to VS2008 (from VS2005) I encountered the following error:

error CS0234: The type or namespace name ‘VisualStudio’ does not exist in the namespace ‘Microsoft’ (are you missing an assembly reference?)

The ObjectBuilder project was the offender and upon reviewing the project's references noted that the "Microsoft.VisualStudio.QualityTools.UnitTestFramework" reference was missing (yellow triangle); it was looking for version 8.0.0.0 and VS2008 has 9.0.0.0.

I added the reference from the .NET tab and the solution would now compile however most of the unit test were failing.  I found that the Tests.ObjectBuilder.BuildPlan and Tests.Unity projects were also pointing to version 8.0.0.0 - but were not complaining that it was missing.   After updating all of the project references all of the unit test passed.

Edited: 2008.07.22 - I installed Unity again so that I could have an original source set to work with and found that all I had to do was change the Copy Local property from true to false - then the entire solution compiled without issue.


Tags: ,
Categories: Unity


Actions: E-mail | Permalink |  Grammar/Typo/Better way? Please let me know