Error when executing visual studio unit tests without installing visual studio using command line

守給你的承諾、 提交于 2019-12-11 00:45:09

问题


I want to execute visual studio unit tests without installing visual studio . To achieve this , I made some registry changes and copied the dll's required in a folder with MSTest.exe file . But when I try to execute the test using a command line "mstest /noisolation /testcontainer:TestProject1.dll" it showing the below error.

C:\Tools\mstest>mstest /noisolation /testcontainer:TestProject1.dll
Microsoft (R) Test Execution Command Line Tool Version 10.0.30319.1
Copyright (c) Microsoft Corporation. All rights reserved.

Failed to initialize the unit test extension 'CodedUITestAttribute': Failed to create an instance of the TestClassExtensionAttribute ('Microsoft.VisualStudio.TestTools.UITesting.CodedUITestAttribute, Microsoft.VisualStudio.QualityTools.CodedUITestFramework, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a') for the unit test extension 'CodedUITestAttribute': Could not load file or assembly 'Microsoft.VisualStudio.QualityTools.CodedUITestFramework, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.
bin\release\prjcco.dll
Unable to load the test container 'bin\release\prjcco.dll' or one of its dependencies. Error details: System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.VisualStudio.TestTools.UITesting, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.

回答1:


You need to include Microsoft.VisualStudio.TestTools.UITesting.dll.



来源:https://stackoverflow.com/questions/11504849/error-when-executing-visual-studio-unit-tests-without-installing-visual-studio-u

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!