Я преобразовал решение VS2008, которое содержит некоторые проекты поблочного тестирования к VS2010. После преобразования я пытался скомпилировать решение, но я получаю следующую ошибку:
Имя типа или пространства имен 'VisualStudio' не существует в пространстве имен 'Microsoft' (Вы пропускаете ссылку на сборку?)
Объявление пространства имен не может быть найдено using Microsoft.VisualStudio.TestTools.UnitTesting;
. Кроме того, я не мог найти Microsoft. VisualStudio. QualityTools. Блок UnitTestFramework, когда я пытался добавить новую ссылку проекта.
Кто-либо знает то, что я делаю неправильно?
I just had this problem as well, and with a Microsoft.Data.Schema library as well. The answer is correct, in that these library are on the machine and in the VS 10.0 directory.
The problem (at least for me) was that the solution was converted from VS2008 and the conversion utility targetted the project for .NET 3.5. Since the 10.0 library require .NET 4.0 they are not picked up by the compiler.
The solution is to either revert to use VS2008 where these resolve correctly; or to switch the project to compile for .NET 4.0 so you can use the available libraries.
Он называется Microsoft.VisualStudio.QualityTools.UnitTestFramework.dll
.
Вы можете найти его в C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\PublicAssemblies\Microsoft.VisualStudio.QualityTools.UnitTestFramework.dll